Skip to content

ImportError: cannot import name '_ENABLE_AIP_52' from 'airflow.settings'  #31064

Closed

Description

@dominik-werner-casra

Apache Airflow version

2.6.0

What happened

After updating to Airflow 2.6.0, none of the DAGs can be imported anymore.

image

What you think should happen instead

The DAGs should be imported like in version 2.5.1.

How to reproduce

The airflow webserver needs to be running. Then navigate to the /home and the errors import errors appear at the top.

Operating System

Ubuntu 22.04.1 LTS

Versions of Apache Airflow Providers

apache-airflow-providers-common-sql==1.3.3
apache-airflow-providers-ftp==3.3.0
apache-airflow-providers-http==4.1.1
apache-airflow-providers-imap==3.1.1
apache-airflow-providers-postgres==5.4.0
apache-airflow-providers-sqlite==3.3.1

Deployment

Other

Deployment details

Airflow is installed via pip on the Ubuntu server system. No containers (nor orchestrators) involved.

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. boring-cyborg commented on May 4, 2023

    @boring-cyborg

    Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

  2. eladkal commented on May 4, 2023

    @eladkal
    Contributor

    mmm _ENABLE_AIP_52 was added in #30510 which is targeted for 2.7.0
    #30509 that uses _ENABLE_AIP_52 was cherry picked for 2.6.0

    cc @ephraimbuddy @potiuk not sure how this happened but I guess we need 2.6.1 rather quickly?

  3. eladkal commented on May 4, 2023

    @eladkal
    Contributor

    @dominik-werner-casra did you modify settings.py in some way?

  4. potiuk commented on May 4, 2023

    @potiuk
    Member

    I think you have a broken installation. It almost looks like part of airflow files in your installation come from one airflow version and part comes from another. Can you please take a look at the installation process you have and any custom steps you do there, because I think this problem you have might only happen if somewhere in your installation process you manually replace the settings.py file that comes with airlfow with one that is your custom settings.py - which of course you absoluttely should not do. You have local_setings.py that you can replace but the "settings.py" that comes from airflow should never be replaced.

  5. potiuk commented on May 4, 2023

    @potiuk
    Member

    Conveting it to a discussion. We both wiht @jedcunningham agree there is no way you get this error unless you do something really bad to airflow during installation. We would love to hear what is what you are doing @dominik-werner-casra

  6. locked and limited conversation to collaborators on May 4, 2023
  7. converted this issue into a discussion #31065 on May 4, 2023
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

    area:corekind:bugThis is a clearly a bugneeds-triagelabel for new issues that we didn't triage yet

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions