shutil.copy2 给出 "SameFileError" 尽管文件完全不同 - 为什么?
shutil.copy2 gives "SameFileError" altho files are not at all the same - why?
File "C:\WPy64-3810\python-3.8.1.amd64\lib\shutil.py", line 239, in copyfile
raise SameFileError("{!r} and {!r} are the same file".format(src, dst))
SameFileError: 'G:\My Drive\xxxxxxxxxxxx\Customers (CR, Kit, & Consulting)\xxxxx\reports\old drafts\Rxxxxxxxx-1E0 (canceled pilot).doc' and
'G:\Shared drives\Studies sorted by model\Executed - updated 2020-03-22 15h05m55s\EAE in C57BL_6 mice, therapeutic\MOG35-55\Rxxxxxxxx-1E0 (canceled pilot) xxxxx__Therapeutic EAE studies in C57BL_6 mice.doc' are the same file
这里到底发生了什么?
Python 3.8, x64, Windows - 它打印的两个文件显然完全不一样,但它说 "SameFileError".
我在一些地方用 "xxxxx" 编辑了路径(这些是客户文件)。并插入换行符使 source/dest 文件名对齐(更容易比较)。
FWIW,源文件路径和目标文件路径都在 Google Drive File Stream (G:) 上;这可能与它有关。
这是一个与 shutil 如何读取 Google 虚拟云端硬盘文件系统有关的错误。
File "C:\WPy64-3810\python-3.8.1.amd64\lib\shutil.py", line 239, in copyfile
raise SameFileError("{!r} and {!r} are the same file".format(src, dst))
SameFileError: 'G:\My Drive\xxxxxxxxxxxx\Customers (CR, Kit, & Consulting)\xxxxx\reports\old drafts\Rxxxxxxxx-1E0 (canceled pilot).doc' and
'G:\Shared drives\Studies sorted by model\Executed - updated 2020-03-22 15h05m55s\EAE in C57BL_6 mice, therapeutic\MOG35-55\Rxxxxxxxx-1E0 (canceled pilot) xxxxx__Therapeutic EAE studies in C57BL_6 mice.doc' are the same file
这里到底发生了什么?
Python 3.8, x64, Windows - 它打印的两个文件显然完全不一样,但它说 "SameFileError".
我在一些地方用 "xxxxx" 编辑了路径(这些是客户文件)。并插入换行符使 source/dest 文件名对齐(更容易比较)。
FWIW,源文件路径和目标文件路径都在 Google Drive File Stream (G:) 上;这可能与它有关。
这是一个与 shutil 如何读取 Google 虚拟云端硬盘文件系统有关的错误。