Render Python Encodings Error
Render is a platform as a service company that makes it easy to quickly deploy small apps. They have an easy-to-use free tier and I wanted run a Python app with dependencies managed by Poetry. Things had been going pretty well until I unexpectedly got the following error after a deploy
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encodingPython runtime state: core initializedModuleNotFoundError: No module named 'encodings'
You don’t have to search for too long to find out this isn’t good.
I tried changing the PYTHON_VERSION
and POETRY_VERSION
to no avail.
I also read a few threads on community.render.com.
With nothing much else I could think of trying, I happened to find the Clear build cache & deploy
sub-option under Manual Deploy
.
Fortunately for me, running that fixed my issue.
Hopefully, this helps save someone time.
Recommended
Sandboxed Python Environment
Disclaimer: I am not a security expert or a security professional.
Fireworks.ai OpenAI Compatibility
I've starting playing around with Fireworks.ai to run inference using open source language models with an API. Fireworks' product is the best I've...
Limiting concurrency with Python Coroutines
In a previous note, I discussed running coroutines in a non-blocking manner using gather. This approach works well when you have a known number of...