question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Breaks Pillow webp support

See original GitHub issue

Installed Nuitka via pip3, Pillow via apt from debian repos.

$ nuitka3 --version
0.8.4
Commercial: None
Python: 3.10.5 (main, Jun  8 2022, 09:26:22) [GCC 11.3.0]
Flavor: Debian Python
Executable: /usr/bin/python3
OS: Linux
Arch: x86_64
Distribution: Debian sid

Pillow v9.1.1. My wish is to make Pillow code faster and produce single python-independent binary. AppImage is ok for me. Consider following example:

#!/usr/bin/env python3

from PIL import Image

def main():
    Image.open("in.jpg").save("out.webp")

if __name__ == "__main__":
    main()

Compiling with nuitka and executing:

$ CCFLAGS='-march=native' nuitka3 --quiet --onefile --follow-stdlib --follow-imports --remove-output --enable-plugin=numpy --enable-plugin=pyqt5 -j3 webp.py

produces binary webp.bin

$ ./webp.bin
Traceback (most recent call last):
  File "/tmp/.mount_webp.bzy6UMM/webp.py", line 10, in <module>
    main()
  File "/tmp/.mount_webp.bzy6UMM/webp.py", line 7, in main
    Image.open("in.jpg").save("out.webp")
  File "/tmp/.mount_webp.bzy6UMM/PIL/Image.py", line 2280, in save
ValueError: unknown file extension: .webp

So no WebP support, unfortunate. Replacing out.webp with e.g. out.png leads to working program, but I need WebP for my specific purpose. UPD0: Simplified command: $ nuitka3 --onefile --full-compat --remove-output --enable-plugin=numpy --enable-plugin=pyqt5 webp.py doesn’t work either.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
kayhayencommented, Jun 17, 2022

Part of the of current pre-release, and will be part of 0.9 release.

0reactions
kayhayencommented, Jun 23, 2022

Part of the 0.9 release that I just made.

Read more comments on GitHub >

github_iconTop Results From Across the Web

WEBP support not installed error with Pillow included in ...
Pillow has been tested with version 0.1.3, which does not read transparent WebP files. Versions 0.3.0 and above support transparency.
Read more >
webp - PyPI
Python bindings for WebP. ... Python 3 (tested with v3.6); cffi; Pillow; numpy ... which breaks webp.load_images when the FPS is specified.
Read more >
Unable to export WEBP, No module named 'PIL' - Inkscape
Summary: I'm unable to export my drawing into WEBP using "Export PNG image" ... Incompatible library version error on MacOS Big Sur (Pillow)....
Read more >
src/_webp.c · squarecapadmin/Pillow - Gemfury
squarecapadmin / Pillow python ... message); break; case WEBP_MUX_BAD_DATA: case WEBP_MUX_NOT_ENOUGH_DATA: ... WebP Animation Support ...
Read more >
26 WebP support - MComix Patches - SourceForge
Here is a a patch for WebP support. It requires Pillow rather than PIL. The WebP makes for archives that are generally a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found