1 移动文件 复制文件 忽略错误
“Destination path ‘%s’ already exists” % real_dst
目标路径“%s”已存在“%real”
try :
shutil.move(文件, "长期不用文件/")
except KeyError :
continue
except OSError :
continu
2 命令和文件名重名
AttributeError: partially initialized module 'cv2' has no attribute 'imread' (most likely due to a circular import)
2、报错翻译过来的结果就是:AttributeError:部分初始化的模块“itchat”没有属性“auto_login”(很可能是由于循环导入)
我再看了看我的命名方式,我就笑了~~~,我的文件命名为 itchat.py 了 ,这就是给自己挖坑,改了文件名就好了,改成了test_itchat.py
3 路径醋味
‘NoneType’ object has no attribute ‘shape’
4 文件名错误
‘NoneType’ object has no attribute ‘shape’