I am trying to creatre a webservice out of flask python , its failing with fillowing error message
ImportError: cannot import name ‘soft_unicode’ from ‘markupsafe’ (/opt/render/project/src/.venv/lib/python3.11/site-packages/markupsafe/init.py)
Hi!
Make sure your render instance has the same python version as your Venv. you can specifyit using the instance environment variables: PYTHON_VERSION
The new error looks like a variation of the same problem as before.
Pime Panama (thanks for contributing!) has the right idea here: you need to ensure the Python version is compatible with all the dependency versions you’ve specified. If this is working in your local environment, be sure all the versions on the Render service match the versions being used locally.
You can set the Python version for a native environment by following these instructions: https://docs.render.com/python-version. With Docker, you have complete control over the environment, so I would defer to a Python/Docker community regarding the best way there.