Python PIL | pil.unidentifiedimageerror: cannot identify image error

If you are getting Python PIL, pil.unidentifiedimageerror: cannot identify image error, then follow below steps to resolve it.


  1. Check whether the image you are using is supported by PIL or not
  2. If you are processing images from a folder, go to the folder, unhide the files, check whether there are any image files not supported by PIL. Delete them if you find or convert to PIL supported format.
  3. Sometimes, when your python code is terminated in between while you are processing any image or images, temporary image files will be created in that image’s folder. So, when you run the code next time, you will encounter Attribution cannot identify image file. So, follow the second step in such case.

Also see: python pillow tutorial with examples

About the Author


A passionate blogger. Love to share solutions and best practices on wordpress hosting, issues and fixes, excel VBA macros and other apps

Leave a Reply

Your email address will not be published. Required fields are marked *