Is there a way to update Poetry to 1.2.0 or later?
The web service shell uses Poetry version 1.1.14. Version 1.1.14 has a bug when reading poetry.lock files created by 1.2.0 and later where it incorrectly uninstalls a certain dependency.
I tried to solve this by using 1.1.14 locally, but version 1.1.14 hangs when resolving Wagtail dependencies for Wagtail 4.1.1, which is the package I’m trying to use. Later versions seem to work fine.
So I’m stuck. It appear that the only way to proceed would be to update Poetry on the server to 1.2.0 or later. Is there any way to do that?
A good workaround would be to use Docker [https://render.com/docs/docker] to deploy your service, which will give you much greater granularity over the versions of the packages you’re using.
This is really a major roadblock. I voted on the topic, but I really think you guys should update Poetry or at least give an option to specify the version. It’s tough (or impossible) to wrangle multiple versions of poetry on my development system just to deal with the fact that Render is on an old version.
Also, my site has been running perfectly for two years as a regular web instance, I’d really rather not convert the whole thing to a docker just to get away from an old incompatible poetry version.
Thanks so much for the help. I upgraded to a paid instance for my test platform so that I can get to the logs. Looks like it fails on something to do with encodings:
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = '/opt/render/project/src/.poetry/venv/bin/python3'
isolated = 1
environment = 0
user site = 0
import site = 1
sys._base_executable = '/opt/render/project/src/.poetry/venv/bin/python3'
sys.base_prefix = '/opt/python-installer/Python-3.10.3'
sys.base_exec_prefix = '/opt/python-installer/Python-3.10.3'
sys.platlibdir = 'lib'
sys.executable = '/opt/render/project/src/.poetry/venv/bin/python3'
sys.prefix = '/opt/python-installer/Python-3.10.3'
sys.exec_prefix = '/opt/python-installer/Python-3.10.3'
sys.path = [
'/opt/python-installer/Python-3.10.3/lib/python310.zip',
'/opt/python-installer/Python-3.10.3/lib/python3.10',
'/opt/python-installer/Python-3.10.3/lib/lib-dynload',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007f79c9885740 (most recent call first):
<no Python frame>
Traceback:
File "<stdin>", line 919, in main
File "<stdin>", line 552, in run
I’ll keep trying to figure this out and update this post if I can find a solution.
This error looks like it occurs when the python version is not installed properly, can you try specifying a python version per the docs here and see if the installation succeeds?