0
  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”编辑了路径(这些是客户文件)。并插入一个换行符以使源/目标文件名对齐(更容易比较)。

FWIW,源文件路径和目标文件路径都在 Google Drive File Stream (G:) 上;这可能与它有关。

4

1 回答 1

1

这是一个与 shutil 如何读取 Google Drive File Stream 文件系统有关的错误。

见这里: https ://bugs.python.org/issue33935

于 2020-08-28T05:59:09.980 回答