Skip to content

ImportError: cannot import name 'parse_rule' from 'werkzeug.routing' (/root/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/werkzeug/routing/__init__.py) #25269

Closed

Description

@kennyth01

Apache Airflow version

2.0.2

What happened

Hi all,
Can anyone guide me, I woke up in the morning and suddenly I have this issue with the ImportError, can anyone guide me, please?

File "/root/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/flask_appbuilder/security/decorators.py", line 21, in <module> from flask_login import current_user File "/root/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/flask_login/__init__.py", line 12, in <module> from .login_manager import LoginManager File "/root/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/flask_login/login_manager.py", line 35, in <module> from .utils import _create_identifier File "/root/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/flask_login/utils.py", line 14, in <module> from werkzeug.routing import parse_rule ImportError: cannot import name 'parse_rule' from 'werkzeug.routing' (/root/airflow-venv/airflow_virtualenv/lib/python3.7/site-packages/werkzeug/routing/__init__.py)

What you think should happen instead

No response

How to reproduce

I am using virtualenv

Operating System

using image: python:3.7.3 in bitbucket pipelines

Versions of Apache Airflow Providers

apache-airflow==2.0.2
apache-airflow-providers-ftp==1.1.0
apache-airflow-providers-http==2.0.0
apache-airflow-providers-imap==1.0.1
apache-airflow-providers-slack==4.0.0
apache-airflow-providers-sqlite==1.0.2
apache-airflow-providers-ssh==1.3.0
setproctitle==1.2.2
pytest==6.2.4
markdown==3.3.4
awscli==1.19.5
apache-airflow[databricks]

Deployment

Virtualenv installation

Deployment details

bitbucket pipelines deploying dags to s3, using mwaa

Anything else

Suddenly I have this issue with the ImportError, can anyone guide me, please?

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. rino0601 commented on Jul 25, 2022

    @rino0601
    Contributor

    I also met this error, then I found my instance's werkzeug version was 2.2.0
    which is doesn't match with constraints-3.9.txt list. (werkzeug==2.1.2)

    so I downgraded werkzeug to 2.1.2, problem solved in my case.

    Perhaps you can solve it this way.

  2. rino0601 commented on Jul 25, 2022

    @rino0601
    Contributor

    I think we need werkzeug limitation (e.g werkzeug<2.2) until flask_login are handle it

  3. potiuk commented on Jul 25, 2022

    @potiuk
    Member

    Closed by #25270

  4. davidism commented on Jul 25, 2022

    @davidism

    Flask-Login 0.6.2 was released.

  5. potiuk commented on Jul 25, 2022

    @potiuk
    Member

    Flask-Login 0.6.2 was released.

    Tahnks @davidism !. I will test it out :)

  6. potiuk commented on Jul 25, 2022

    @potiuk
    Member

    #25291 is running now

  7. kennyth01 commented on Jul 26, 2022

    @kennyth01
    Author

    thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions