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

cannot import name 'Markup' from 'jinja2' #66

Open
Eikosa opened this issue Aug 27, 2022 · 4 comments
Open

cannot import name 'Markup' from 'jinja2' #66

Eikosa opened this issue Aug 27, 2022 · 4 comments

Comments

@Eikosa
Copy link

Eikosa commented Aug 27, 2022

  File "C:\Program Files\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\USER\tg-index\app\__main__.py", line 3, in <module>
    from .main import Indexer
  File "C:\Users\USER\tg-index\app\main.py", line 12, in <module>
    from .routes import setup_routes
  File "C:\Users\USER\tg-index\app\routes.py", line 9, in <module>
    from .views import Views
  File "C:\Users\USER\tg-index\app\views\__init__.py", line 13, in <module>
    from .info_view import InfoView
  File "C:\Users\USER\tg-index\app\views\info_view.py", line 8, in <module>
    from jinja2 import Markup
ImportError: cannot import name 'Markup' from 'jinja2' (C:\Users\USER\AppData\Roaming\Python\Python39\site-packages\jinja2\__init__.py)```
@raihanirfan
Copy link

same

@ACHIYA96
Copy link

ACHIYA96 commented Dec 3, 2022

Add the following line to requirements.txt

jinja2==3.0.3

@Sercalod
Copy link

Add the following line to requirements.txt

jinja2==3.0.3

This worked for me. Much appreciated.

@erickyun
Copy link

Add the following line to requirements.txt
jinja2==3.0.3

This worked for me. Much appreciated.

How did you setup env file?
Can you please tell me how to name the file and how you put variables in that file can you share Screenshot both?

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

5 participants