-
-
Notifications
You must be signed in to change notification settings - Fork 712
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 load library pangocairo-1.0 when trying to get WeasyPrint working on AWS Lambda #401
Comments
Thanks for reporting!
I really don't know how AWS works, I'm afraid I won't be really helpful 😢. But a reason could be that:
I don't know… @sparrovv is using EC2 in #223, maybe it could help to contact him. |
@NoneMan can I close this issue? |
I am seeing the same problem when creating aws lambda function for weasyprint. Did anyone resolved this? |
I'm running WeasyPrint on AWS Lambda, the first run of my lambda function fails because it does not find some pango libs, I copied libpango-1.0.so.0.2800.1, libpangocairo-1.0.so.0.2800.1 and libpangoft2-1.0.so.0.2800.1 from Amazon Linux to the root of my lambda function package, I renamed the firt two .so to pango-1.0 and pangocairo-1.0 and now it is working. I have had some problems with gif images that can be seen in #428 and my comment. |
Is anyone interested in adding an "AWS" section to the documentation? |
Closing. See #428 about images and documentation. |
Guys below is the git link where you can download the weasy print library which works with AWS lambda. https://github.com/Prasengupta/weasyprint_for_awslambda These libraries are picked from Amazon Linux is equal to centOS. which may not working in your local windows machine but works in aws lambda function for sure |
Thanks for the lambda support @Prasengupta @liZe . I've tried uploading my WEasyPrint lambda function with your package directory @Prasengupta but I'm still getting an import error. I've also tried my own zip of packages from pip and imported the3 pango files directly from an Amazon Linux instance (they're still using pango-1.28.1 anyway) but without any success. Removed the WEasyPrint import and execution of the lambda function is fine. I'm out of ideas now unfortunately. Can you tell me how you pulled that zip file together originally? Were they all pulled from Amazon Linux? Thanks so much, |
Hi @procal I think you're trying to execute in python3 which the published package is not supported. Please check with python27 I've searched those files in the amazon Linux instance by the command and able to get them. But I don't remember the path. |
I like WeasyPrint, and I try to get it working on AWS Lambda. To meet the dependencies, I copied libpango-1.0.so and libpangocairo-1.0.so from Amazon Linux environment, and zipped them with my scirpts. But I got an error message when deploying:
And I find this:
The text was updated successfully, but these errors were encountered: