Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot open webp image: UnidentifiedImageError #86

Open
rgoubet opened this issue Dec 28, 2020 · 2 comments
Open

Cannot open webp image: UnidentifiedImageError #86

rgoubet opened this issue Dec 28, 2020 · 2 comments

Comments

@rgoubet
Copy link

rgoubet commented Dec 28, 2020

On an Anaconda distribution, after installing the libwebp package and pillow, I cannot open a webp file (e.g. the test.webp file from the libwebp library).

In [1]: from PIL import Image

In [2]: img = Image.open('test.webp')
C:\Users\user\anaconda3\lib\site-packages\PIL\Image.py:2942: UserWarning: image file could not be identified because WEBP support not installed
  warnings.warn(message)
---------------------------------------------------------------------------
UnidentifiedImageError                    Traceback (most recent call last)
<ipython-input-2-79ee787a81b3> in <module>
----> 1 img = Image.open('test.webp')

~\anaconda3\lib\site-packages\PIL\Image.py in open(fp, mode, formats)
   2941     for message in accept_warnings:
   2942         warnings.warn(message)
-> 2943     raise UnidentifiedImageError(
   2944         "cannot identify image file %r" % (filename if filename else fp)
   2945     )

UnidentifiedImageError: cannot identify image file 'test.webp'

Looks like Pillow/libwebp aren't properly set up on the Anaconda packages. I also tried reinstalling pillow after libwebp, but that didn't help.

@jakirkham
Copy link
Member

cc @sodre (in case this is of interest as well 🙂)

@rgoubet
Copy link
Author

rgoubet commented Feb 13, 2022

Still does not work on Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants