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 'Markup' from 'jinja2.utils' #28549

Closed
2 tasks done
Amphagory opened this issue Dec 23, 2022 · 2 comments
Closed
2 tasks done

ImportError: cannot import name 'Markup' from 'jinja2.utils' #28549

Amphagory opened this issue Dec 23, 2022 · 2 comments
Labels
area:core kind:bug This is a clearly a bug

Comments

@Amphagory
Copy link

Apache Airflow version

2.5.0

What happened

I am upgrading from V2.3.2 to the latest version at this time 2.5.0. Everything seems to have upgraded fine, until I see DAG import errors on the home UX. The error is as follows:

Broken DAG: [/opt/airflow/dags/example_dag.py] Traceback (most recent call last):
  File "/home/airflow/.local/lib/python3.8/site-packages/jinjasql/__init__.py", line 1, in <module>
    from jinjasql.core import JinjaSql
  File "/home/airflow/.local/lib/python3.8/site-packages/jinjasql/core.py", line 6, in <module>
    from jinja2.utils import Markup
ImportError: cannot import name 'Markup' from 'jinja2.utils' (/home/airflow/.local/lib/python3.8/site-packages/jinja2/utils.py)

What you think should happen instead

Looking at similar stack overflow issues, I shouldn't have this issue with the current constraints I am using -> https://raw.githubusercontent.com/apache/airflow/constraints-2.5.0/constraints-3.8.txt

How to reproduce

Run latest dockerized Airflow locally with default values.

Operating System

MacOS

Versions of Apache Airflow Providers

https://raw.githubusercontent.com/apache/airflow/constraints-2.5.0/constraints-3.8.txt

Deployment

Docker-Compose

Deployment details

No response

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@Amphagory Amphagory added area:core kind:bug This is a clearly a bug labels Dec 23, 2022
@boring-cyborg
Copy link

boring-cyborg bot commented Dec 23, 2022

Thanks for opening your first issue here! Be sure to follow the issue template!

@Taragolis
Copy link
Contributor

The error happen in jinjasql, the relevant issue open in their repo: sripathikrishnan/jinjasql#50.
However jinjasql is not a part of Airflow dependencies as well as community providers.

@Taragolis Taragolis closed this as not planned Won't fix, can't repro, duplicate, stale Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core kind:bug This is a clearly a bug
Projects
None yet
Development

No branches or pull requests

2 participants