ImportError: cannot import name 'soft_unicode' from 'markupsafe'
See original GitHub issueHello.
Using jinja2 version is too old, since markupsafe changed his API.
See:
>>> from aiohttp_apispec import setup_aiohttp_apispec
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/mnt/c/Users/akaWolf/venv/lib/python3.8/site-packages/aiohttp_apispec/__init__.py", line 1, in <module>
from .aiohttp_apispec import AiohttpApiSpec, setup_aiohttp_apispec
File "/mnt/c/Users/akaWolf/venv/lib/python3.8/site-packages/aiohttp_apispec/aiohttp_apispec.py", line 11, in <module>
from jinja2 import Template
File "/mnt/c/Users/akaWolf/venv/lib/python3.8/site-packages/jinja2/__init__.py", line 12, in <module>
from .environment import Environment
File "/mnt/c/Users/akaWolf/venv/lib/python3.8/site-packages/jinja2/environment.py", line 25, in <module>
from .defaults import BLOCK_END_STRING
File "/mnt/c/Users/akaWolf/venv/lib/python3.8/site-packages/jinja2/defaults.py", line 3, in <module>
from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401
File "/mnt/c/Users/akaWolf/venv/lib/python3.8/site-packages/jinja2/filters.py", line 13, in <module>
from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/mnt/c/Users/akaWolf/venv/lib/python3.8/site-packages/markupsafe/__init__.py)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5 (1 by maintainers)
Top Results From Across the Web
cannot import name 'soft_unicode' from 'markupsafe ... - GitHub
I'm building the sam project on github action and since the upgrade of sam-cli to 1.38.0, i'm getting following error when i build...
Read more >ImportError: cannot import name 'soft_unicode' from 'markupsafe'
I installed markupsafe 2.0.1 version. Open jupyter notebook. pip uninstall zmq pip install zmq pip install markupsafe==2.0.1 jupyter notebook.
Read more >cannot import name soft_unicode from markupsafe (Solved)
importerror: cannot import name soft_unicode from markupsafe error occurs because of incompatibility of markupsafe package. This markupsafe python package ...
Read more >Cannot import name 'soft_unicode' from 'markupsafe' [Solved]
The "ImportError: cannot import name 'soft_unicode' from 'markupsafe'" occurs because the soft_unicode method has been deprecated in markupsafe version 2.1.0.
Read more >cannot import name 'soft_unicode' from 'markupsafe' jinja2
ImportError : cannot import name 'soft_unicode' from 'markupsafe' (C:\Users\NXHSE\AppData\Roaming\Python\Python39\site-packages\markupsafe_init_.py).
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
New releases (v2.2.3 and v3.0.0b2) has been released with this fix
It looks like the
requirements.txt
has already been updated. Once a new release is pushed out it should be good.