I am using google colab (python) to fetch images from sentinel-hub ..it was working fine and all but the next day when I ran the code again I got an error in the get_data() command .. UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x7fb0c3f0c9b0> Its weird to me that when I restarted the run session as a whole and closed and reopened the note it worked .. (not an efficient solution ) So does anyone know what is this issue and how can I solve it ?
here is the full segment:
img= request.get_data()
UnidentifiedImageError Traceback (most recent call last) in () ----> 1 img= request.get_data()
12 frames
/usr/local/lib/python3.7/dist-packages/PIL/Image.py in open(fp, mode) 2894 if mode == "P": 2895 from . import ImagePalette -> 2896 2897 im.palette = ImagePalette.ImagePalette("RGB", im.im.getpalette("RGB")) 2898 im.readonly = 1
UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x7fb0c3f0c9b0>