![](https://cdn.discordapp.com/avatars/404327973320261633/6c165005c06e221ca82a775b2d0aeeff.webp)
I was trying to make a python function for renderering a pdf with weasyprint. Because appwrite uses alpine images I added following lines to the build settings:
apk add --no-cache weasyprint
pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
In a local docker env everything works well, but appwrite does not find the library when trying to execute the function: OSError: cannot load library 'libgobject-2.0-0': Error loading shared library libgobject-2.0-0: No such file or directory. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libgobject-2.0-0'
Additionally, I wanted to ask if this: return context.res.binary(io.BytesIO(rendered_pdf), 200, { "Content-Type": "application/pdf" })
would be the right return type of the main function? Because I didn't find any docs of the .binary function. Thanks π
![](https://cdn.discordapp.com/avatars/186656408450629633/a_1020a50ae94486c09c02e2868564778d.gif)
I think this because the directory that apk add installs to is not the directory that is cloned into the vm that spins up for the function.
![](https://cdn.discordapp.com/avatars/186656408450629633/a_1020a50ae94486c09c02e2868564778d.gif)
I had a similar issue with trying to install chrome, but I don't remember exacty what directory is the right one. Sorry /:
![](https://cdn.discordapp.com/avatars/404327973320261633/6c165005c06e221ca82a775b2d0aeeff.webp)
So you installed chrome in a different dir?
Recommended threads
- Failed to retrieve access token from Git...
Hi, I have problem to connect to github repository. I make configuration based on docs: https://appwrite.io/docs/advanced/self-hosting/functions I tested it on...
- Requests on the Overview page
Hi! About a month ago everyday the requests count on the overview page seemed a bit high. It says that i made 200K requests today, but thats impossible, because...
- [SOLVED] Server Error
am trying register a user in my nextjs app with signUpWithEmail but am getiing error ` code: 500, type: 'general_unknown', response: { message: 'Serve...
![](/images/bgs/pre-footer.png)