OSError: image file is truncated (12 bytes not processed) Premature end of JPEG file

403 阅读1分钟

解决办法是,再添加如下2句代码: 

from PIL import ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True