Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'soft_unicode' from 'markupsafe' #1601

Closed
diolk49 opened this issue Feb 22, 2022 · 1 comment
Closed

ImportError: cannot import name 'soft_unicode' from 'markupsafe' #1601

diolk49 opened this issue Feb 22, 2022 · 1 comment

Comments

@diolk49
Copy link

diolk49 commented Feb 22, 2022

Error when trying to install jinja :
File "/usr/local/lib/python3.9/site-packages/jinja2/filters.py", line 13, in <module> from markupsafe import soft_unicode ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/usr/local/lib/python3.9/site-packages/markupsafe/__init__.py)

With new version of markup safe (2.1.0), soft_unicode has been removed (it was previously deprecated). We need to "Use soft_str instead" : https://markupsafe.palletsprojects.com/en/2.1.x/changes/#version-2-1-0

Environment:

  • Python version: 3.9
  • Jinja version: ^2.11.3
@ThiefMaster
Copy link
Member

ThiefMaster commented Feb 22, 2022

Duplicate of #1585

You are using an unsupported version of Jinja, please update to the latest version if possible. Additionally, please read https://hynek.me/articles/semver-will-not-save-you/, then use a tool like pip-tools to pin your dependencies and control when you get updates. Be sure to run your tests with deprecation warnings treated as errors so that you get notified of these types of changes early.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants