Python 报错:OSError: cannot identify image file './out_img/.DS_Store'

膨化先生 · May 15, 2019 · 1665 hits

报错信息:

OSError: cannot identify image file './out_img/.DS_Store'

分析原因:

MAC 系统的 FIddler 读取文件会自动创造.DS_Store 文件,存储目录的自定义属性

解决方法:

1.cd 到当前目录
2.查找.DS_Store 文件是否存在
find ./ -name ".DS_Store"
3.删除.DS_Store 文件
find ./ -name ".DS_Store" -delete

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
No Reply at the moment.
需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up