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' #282

Closed
nachiketrss opened this issue Feb 18, 2022 · 9 comments
Closed

Comments

@nachiketrss
Copy link

requirements.txt:
flask~=1.1.2
pandas~=1.2.2
Werkzeug~=1.0.1
numpy~=1.20.1
twilio~=7.2.0
waitress~=2.0.0
pyjwt~=2.3.0
cryptography~=36.0.1

python -m venv venv
venv\scripts\activate
pip install -r requirements.txt

python app.py

Error:
(venv) D:\SonicApi>python app.py
Traceback (most recent call last):
File "D:\SonicApi\app.py", line 8, in
from flask import Flask, request, abort, jsonify
File "D:\SonicApi\venv\lib\site-packages\flask_init_.py", line 14, in
from jinja2 import escape
File "D:\SonicApi\venv\lib\site-packages\jinja2_init_.py", line 12, in
from .environment import Environment
File "D:\SonicApi\venv\lib\site-packages\jinja2\environment.py", line 25, in
from .defaults import BLOCK_END_STRING
File "D:\SonicApi\venv\lib\site-packages\jinja2\defaults.py", line 3, in
from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401
File "D:\SonicApi\venv\lib\site-packages\jinja2\filters.py", line 13, in
from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (D:\SonicApi\venv\lib\site-packages\markupsafe_init_.py)

  • Python version: Python 3.9.10
  • MarkupSafe version: MarkupSafe 2.1.0
@davidism
Copy link
Member

davidism commented Feb 18, 2022

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.

peterjc added a commit to peterjc/bioconda-utils that referenced this issue Feb 18, 2022
@davidism davidism pinned this issue Feb 18, 2022
RogerHaase added a commit to RogerHaase/moin that referenced this issue Feb 18, 2022
dpryan79 pushed a commit to bioconda/bioconda-utils that referenced this issue Feb 18, 2022
@qeternity

This comment was marked as off-topic.

@hiaselhans
Copy link

i think it would really help to leave at least one of these issues open...

if not for others then for you, to save some work closing new issues.

☮️

@ThiefMaster
Copy link
Member

It is pinned... I'm not sure whether it being open would help in giving it visibility.

@hiaselhans
Copy link

oh, sorry i didn't see that!

so then, just for me and i found it already. Sorry for the noise

@moorepants

This comment was marked as off-topic.

@ThiefMaster

This comment was marked as off-topic.

@qeternity

This comment was marked as off-topic.

@moorepants

This comment was marked as off-topic.

tigrannajaryan pushed a commit to open-telemetry/build-tools that referenced this issue Feb 24, 2022
It is currently failing (see build failure in #85) due to pallets/markupsafe#282
qiluo-msft added a commit to sonic-net/sonic-buildimage that referenced this issue Feb 25, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 11, 2022
@davidism davidism unpinned this issue Apr 1, 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

6 participants