OSError: image file is truncated (18 bytes not processed)

#1


I try to search the problem on forum. And i have find a answer like this
https://stackoverflow.com/questions/12984426/python-pil-ioerror-image-file-truncated-with-big-images
but it did not work. anyone help me,thank you.

0 Likes

#2

Here is a same problem ,https://forums.fast.ai/t/oserror-image-file-is-truncated-38-bytes-not-processed/30806
it seems to have not solve.

0 Likes

(Seemant) #3

from PIL import ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True

add this at the start of your notebook.

0 Likes

#5

Thank you very much. I have done this but it didn’t work. Meanwhile,i found that this answer can solve IOError not OSError.

0 Likes

(qishao) #6

I have the same problem as you, I am very upset, I don’t know how to solve it.

0 Likes

#7

add this in your notebook

from PIL import ImageFile
ImageFile.LOAD_TRUNCATED_IMAGES = True

and add it in your PIL\ImageFile.py too
you can find the file path in pic 2 i gave in this problem ,the last one error information

0 Likes

(qishao) #8

Okay, i’ll have a try, thank you

0 Likes