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

demo-flask ImportError: cannot import name 'Markup' from 'jinja2' #423

Open
fredcy opened this issue Dec 3, 2024 · 1 comment
Open

demo-flask ImportError: cannot import name 'Markup' from 'jinja2' #423

fredcy opened this issue Dec 3, 2024 · 1 comment

Comments

@fredcy
Copy link

fredcy commented Dec 3, 2024

When I attempt to run the Flask demo it fails immediately:

ImportError: cannot import name 'Markup' from 'jinja2' (/home/example/test-saml/python3-saml/demo-flask/env/lib/python3.10/site-packages/jinja2/init.py)

I'm using Python 3.10.15 and the master branch of python3-saml. I have not touched any of the files like settings.json yet as I want to get a baseline first. Here are my steps:

cd demo-flask
python3 -m venv env
. env/bin/activate
pip install -r requirements.txt
python index.py

The ImportError happens immediately.

pip freeze shows that I'm getting these packages:

click==8.1.7
Flask==1.0
itsdangerous==2.2.0
Jinja2==3.1.4
MarkupSafe==3.0.2
Werkzeug==3.1.3

@fredcy
Copy link
Author

fredcy commented Dec 3, 2024

If I install Flask and python3-saml per the following updated requirements.txt contents, then python index.py runs without crashing:

flask==3.1.0
python3-saml==1.16.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant