Python报错:StopIteration: image file is truncated

错误展示:StopIteration: image file is truncated

报错原因:图像文件被截断;

解决方法:在前面加载模块的地方添加两行代码,轻松搞定

from PIL import ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True

猜你喜欢

转载自blog.csdn.net/songchunxiao1991/article/details/83544470