python:PIL.Image.open() IOError: cannot identify image file

求助大神,在用pillow的Image模块读取图片时发生Image.open() IOError: cannot identify image file错误,pillow是4.2.1,python是2.7.6,在python文件里用的是from PIL import Image,目标图片也没有损坏完好无损,但是就是一直在报着个错误,求助大神怎么解决??

检查下文件路径 以及 文件名 是否符合变量规则,最好不要有中文,试试左斜杠 和 右斜杠路径。
温馨提示:答案为网友推荐,仅供参考
第1个回答  2017-07-14
这个类库是用来做什么的
相似回答