PIL throws this error, if the loaded image file is truncated.
You could try to isolate this file and remove it or use
from PIL import ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True

to load this file nevertheless.