Fixed cairo and gi module issue #541
Fixed cairo and gi module issue #541gitSouvik wants to merge 8 commits intocheran-senthil:masterfrom
Conversation
Updated dependencies and installation commands in Dockerfile.
|
Thanks for this bot. Its very useful. Working great in our college Discord community. |
| "pycairo", | ||
| "legacy-cgi", | ||
| "PyGObject", |
There was a problem hiding this comment.
Weird, I thought this was already fixed with how we installed it. I don't really want dependencies here and that's why we moved it all to the Dockerfile.
Python is just terrible at handling dependencies.
There was a problem hiding this comment.
Yeah, Docker (was) still giving those errors. You can check it yourself if you don’t believe me.
About the .env file stuff — I had actually hosted the bot on a free platform and set the environment variables directly on that platform. Later, I forgot about that and assumed the variables were being read from the .env file (instead of .env.example), so I changed them here. (I was wrong — those variables were changed globally)
There was a problem hiding this comment.
@cheran-senthil Should I change change .env to .env.example and send and new PR ?
There was a problem hiding this comment.
I'm confused what the change you are talking about is. .env.example is an example, and .env is what is actually used. The instructions say to make a copy of the file and to update the needed values inside it.
pyproject.toml
Outdated
| # Images | ||
| "pillow", | ||
| "pycairo", | ||
| "legacy-cgi", |
There was a problem hiding this comment.
Why? We're not using cgi at all, are we?
There was a problem hiding this comment.
Sorry for the late reply — I was not well recently.
I reviewed the legacy-cgi information and realized that I had incorrectly used it as a workaround for the gi module error.
Removed
There was a problem hiding this comment.
Also I was facing issue on those fonts. It was giving 403 error while requesting the NotoSansCJK-Bold.ttc and NotoSansCJK-Regular.ttc fonts, so added them manually.
While deploying this bot to my Discord server, I ran into multiple runtime issues related to missing
gi/cairodependencies when running inside a Docker environment (especially with minimal base images).These issues caused the bot to crash during startup due to incomplete system-level bindings required by PyGObject and Cairo.
I’m requesting that this PR be merged to prevent other users from running into the same deployment issues.
Changes Made
gi/cairopyproject.tomlto ensure correct Python dependency resolutionAfter these changes:
gi/cairofailuresNote