使用shutil.copy2
复制大文件时,我随机收到此错误。复制过程已启动,并在复制操作期间返回错误。这个库是否对python 3不稳定,是否有更好的复制大文件的解决方案?
代码很简单:shutil.copy2(source_path, destination_path)
Error
Traceback (most recent call last):
File "D:\Tests\Tests.py", line 24, in test_copy_large_file
shutil.copy2(large_file_path, destination_path)
File "C:\Users\me\AppData\Local\Programs\Python\Python35-32\lib\shutil.py", line 251, in copy2
copyfile(src, dst, follow_symlinks=follow_symlinks)
File "C:\Users\me\AppData\Local\Programs\Python\Python35-32\lib\shutil.py", line 116, in copyfile
copyfileobj(fsrc, fdst)
File "C:\Users\me\AppData\Local\Programs\Python\Python35-32\lib\shutil.py", line 76, in copyfileobj
fdst.write(buf)
OSError: [Errno 9] Bad file descriptor