Closed NoneMan closed 6 years ago
Thanks for reporting!
Why it can find libpango-1.0.so but cannot find libpangocairo-1.0.so ?
I really don't know how AWS works, I'm afraid I won't be really helpful :cry:. But a reason could be that:
libpango-1.0-0
) is wrong for pangocairo (libpangocairo-1.0-0
instead of something like libpangocairo-1.0-1
), and other names that work on other systems don't work on AWS.Is there a way to use WeasyPrint on AWS Lambda ?
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 Please raise a ticket if you face any issues.
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, Ed
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: