Open Ayiadim opened 3 years ago
Is your function running in Windows? This package needs to run under windows.
Have the same problem on my Azure WebApp -> exact same crash response OSError: no library called "cairo" was found
.
It's a windows based instance indeed.
I've created an alternate package https://github.com/berthertogen/weasyprint.wrapped which supports Windows as well as Linux. Haven't tested it in a azure function though. You might give that a try?
That alternate package also fails with a missing library, this time it's:
cannot load library 'pango-1.0-0'
We're still on a managed web app environment in Azure. It works locally on my machine so I don't know how these environments are different but there must be something different. I'm not a python developer to debug this efficiently enough i.e. mostly would be good to understand why he finds these missing libraries on my local machine but not on azure.
Hello @jektvik, I've done some more research on the subject after having an issue submitted on the other repo as well. More info here https://github.com/berthertogen/weasyprint.wrapped/issues/39#issuecomment-1367331090.
TLDR: The Azure App Services/Functions are missing components which aren't in python packages (and thus cannot be packaged). The provided solution provides an asp.net container with the necessary components, Azure App Services/Functions can run this container (or an extension of that container with your sources on it).
I have researched the Azure App Service Container options and got it working, if you like to use it in an Azure App Function as well could you give me a poke in this issue and I'll investigate and provide an example.
Hi @berthertogen thanks for reverting. Containers are unfortunately a headache for us at this moment as we do not have the facility to build containers yet (not even locally, no comment, but it is what it is).
Hello,
This isn't really an issue with the package itself but more of a question to see if anyone else has had this problem.
I've added this package to a .NET azure function, it works fine locally but as soon as it is deployed to the cloud I get these errors:
It looks like the dependencies are failing, I've added python 3.6.4 x64 and x86 as an extension but it didn't seem to solve the problem.
Any help would be appreciated, thanks.