ValueError: Could not load "" Reason: "broken data stream when reading image file" 1

ValueError: Could not load “” Reason: “broken data stream when reading image file”

from PIL import Image, ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True

Here is what the above code is Doing:
1. We’re importing the Image module from the PIL package.
2. We’re importing the ImageFile module from the PIL package.
3. We’re setting the LOAD_TRUNCATED_IMAGES attribute of the ImageFile module to True.

Similar Posts