繁体   English   中英

Shutil.move 无法在驱动器之间移动

[英]shutil.move cannot move between drives

我正在尝试将文件移动到我有权访问的映射网络驱动器。 但它不起作用。 这个问题还有其他帖子,但都没有答案。 有人知道是什么交易吗?

  File "C:\Program Files (x86)\Python37-32\lib\shutil.py", line 557, in move
    os.rename(src, real_dst)
OSError: [WinError 17] The system cannot move the file to a different disk drive: 'C:\\Users\\opcon\\pyscripts\\crif\\129049_24360_20200102223356_.csv' -> 'G:\\b_129049_24360_20200102223356_.csv'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/Users/opcon/pyscripts/fix_and_scan_crifloans.py", line 379, in fix_crifloan_csvs_exe
    shutil.move(local_full_file_name, full_file_name_b)
  File "C:\Program Files (x86)\Python37-32\lib\shutil.py", line 571, in move
    copy_function(src, real_dst)
  File "C:\Program Files (x86)\Python37-32\lib\shutil.py", line 257, in copy2
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "C:\Program Files (x86)\Python37-32\lib\shutil.py", line 121, in copyfile
    with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: 'G:\\b_129049_24360_20200102223356_.csv'

看起来我应该可以访问

但显然我无权访问

这实际上是我的 Windows 权限的一个问题,这并没有立即明显,因为 Windows 说我应该拥有权限。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM