PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问

PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问,第1张

Traceback (most recent call last):
  File "E:\Python3.7\lib\shutil.py", line 566, in move
    os.rename(src, real_dst)
PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'D:/study/python/1001/test.word' -> 'D:/code/test.word'

多半打开了啥,没有close
 

Traceback (most recent call last):
  File "E:\Python3.7\lib\shutil.py", line 566, in move
    os.rename(src, real_dst)
PermissionError: [WinError 32] 另一个程序正在使用此文件,进程无法访问。: 'D:/study/python/1001/test.word' -> 'D:/code/test.word'

During handling of the above exception, another exception occurred:

多半是要 *** 作的文件打开了,比如word,txt啥的

Traceback (most recent call last):
  File "E:\Python3.7\lib\shutil.py", line 566, in move
    os.rename(src, real_dst)
FileNotFoundError: [WinError 2] 系统找不到指定的文件

这种是要移动的路径不存在,如果用了

shutil.move的话哈

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/918216.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-16
下一篇 2022-05-16

发表评论

登录后才能评论

评论列表(0条)

保存