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 'escape' from 'jinja2' #62

Open
hax0rgb opened this issue Apr 4, 2022 · 0 comments
Open

ImportError: cannot import name 'escape' from 'jinja2' #62

hax0rgb opened this issue Apr 4, 2022 · 0 comments

Comments

@hax0rgb
Copy link

hax0rgb commented Apr 4, 2022

Running manually:

python3 run.py

Output:

Traceback (most recent call last):
  File "/Users/gaurang/Documents/Tools/Adhrit/app.py", line 4, in <module>
    from flask import Flask, json, jsonify, render_template, request
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/flask/__init__.py", line 16, in <module>
    from jinja2 import Markup
ImportError: cannot import name 'Markup' from 'jinja2' (/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/jinja2/__init__.py)

Using Docker:

docker-compose up

Output:

WARNING: Image for service web was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Creating adhrit_web_1 ... done
Attaching to adhrit_web_1
web_1  | Traceback (most recent call last):
web_1  |   File "/app/app.py", line 4, in <module>
web_1  |     from flask import Flask, json, jsonify, render_template, request
web_1  |   File "/usr/local/lib/python3.10/site-packages/flask/__init__.py", line 14, in <module>
web_1  |     from jinja2 import escape
web_1  | ImportError: cannot import name 'escape' from 'jinja2' (/usr/local/lib/python3.10/site-packages/jinja2/__init__.py)
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