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

Build musllinux wheels for alpine users #2

Closed
ContinentalGuy opened this issue May 20, 2021 · 6 comments
Closed

Build musllinux wheels for alpine users #2

ContinentalGuy opened this issue May 20, 2021 · 6 comments

Comments

@ContinentalGuy
Copy link

Hi, @fdintino !

I ran into an error while trying to save image.

  File "/app/source/application/utils/resize.py", line 52, in save_image_to_buffer
    image.save(result, format=out_type, **save_kwargs)
  File "/usr/local/lib/python3.7/site-packages/PIL/Image.py", line 2102, in save
    save_handler(self, fp, filename)
  File "/usr/local/lib/python3.7/site-packages/pillow_avif/AvifImagePlugin.py", line 199, in _save
    is_single_frame,
RuntimeError: Failed to encode image: No codec available

Could you please help me to understand what package did i forget to install.

@ContinentalGuy
Copy link
Author

$ /app/source # apk list -I | grep avif
.pillow-deps-avif-20210520.085254 noarch {.pillow-deps-avif} () [installed]
libavif-dev-0.9.0-r0 x86_64 {libavif} (BSD-2-Clause) [installed]
libavif-apps-0.9.0-r0 x86_64 {libavif} (BSD-2-Clause) [installed]
libavif-0.9.0-r0 x86_64 {libavif} (BSD-2-Clause) [installed]
$ /app/source # apk list -I | grep aom
aom-libs-1.0.0-r3 x86_64 {aom} (custom) [installed]
aom-1.0.0-r3 x86_64 {aom} (custom) [installed]

@fdintino
Copy link
Owner

What output do you get when you run the command avifenc -V?

@ContinentalGuy
Copy link
Author

$ /app # avifenc -V
/bin/sh: avifenc: not found

🙂

@ContinentalGuy
Copy link
Author

By the way, my microservice is running on alpine. I believe it is crucial for the issue, as when I moved the microservice to ubuntu, no "codec errors" appeared and everything went fine.

@ContinentalGuy
Copy link
Author

Cannot find it in alpine packages.

@fdintino
Copy link
Owner

It looks as though I'll probably need to build musllinux wheels. And to do that I may need to switch to cibuildwheel, which has musl support in its latest alpha release. I might keep the multibuild infrastructure in place (since it's the basis for some of my PRs to merge this into Pillow) even if I add cibuildwheel for alpine-compatible wheels.

@fdintino fdintino changed the title No codec available Build musllinux wheels for alpine users Oct 14, 2021
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