-
Hi been receiving error for a while now while running some simple image manipulations on AWS Lamba and python3.9/3.10.
Seems to have something to do with https://pillow.readthedocs.io/en/stable/reference/ImageFont.html#PIL.ImageFont.truetype according to stack trace. No issues on my personal Windows10/11 or Github workflows with ubuntu-latest (22.04) or windows-latest (Server 2022). What should I do? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
libpng is only used by libfreetype, which is only used by the ImageFont module, so it makes sense that you are seeing it there in the stack trace. How did you install Pillow? Are you using the latest version? From what I recall, the system libraries provided on AWS Lambda tend to be quite old, so I would assume that pip installs with |
Beta Was this translation helpful? Give feedback.
-
I have been using Serverless Framework for deployment and using AWS seems to run Lambdas on Amazon Linux 2. https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html Could also be related to this serverless/serverless#11922 however had issues with 3.9 too. |
Beta Was this translation helpful? Give feedback.
-
It seems that as I was deploying locally via serverless from windows machine with parameter |
Beta Was this translation helpful? Give feedback.
It seems that as I was deploying locally via serverless from windows machine with parameter
dockerizePip: non-linux
it was usingpublic.ecr.aws/sam/build-python3.10:latest-x86-64
under the hood for non-linux machines. Switched my build automation to use this as well and everything works.