Repository navigation
ImportError: cannot import name '_ENABLE_AIP_52' from 'airflow.settings' #31065
Apache Airflow version2.6.0 What happenedAfter updating to Airflow 2.6.0, none of the DAGs can be imported anymore. What you think should happen insteadThe DAGs should be imported like in version 2.5.1. How to reproduceThe airflow webserver needs to be running. Then navigate to the /home and the errors import errors appear at the top. Operating SystemUbuntu 22.04.1 LTS Versions of Apache Airflow Providersapache-airflow-providers-common-sql==1.3.3 DeploymentOther Deployment detailsAirflow is installed via pip on the Ubuntu server system. No containers (nor orchestrators) involved. Anything elseNo response Are you willing to submit PR?
Code of Conduct
|
Replies: 8 comments 7 replies
|
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. |
|
mmm cc @ephraimbuddy @potiuk not sure how this happened but I guess we need 2.6.1 rather quickly? |
|
@dominik-werner-casra did you modify |
|
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 |
|
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 |
|
Thank you for providing some insight with our issue. After looking into the code I agree that this is strange and should not happen. However, we did not change "settings.py" but just ran |
|
Ok... I have been using python on a regular basis for 7 years now, but this has to be the weirdest issue I ever came across:
The really strange thing is this: the error should be impossible the file "/usr/local/lib/python3.10/dist-packages/airflow/decorators/setup_teardown.py" does not exist on the system!!! Does anyone have an idea what is happening here? Is there some mechanism involved that converts python code to executables for increased performance? I have never seen something so strange with any python package before. |
|
@dominik-werner-casra For now, set |


@dominik-werner-casra For now, set
AIRFLOW__SCHEDULER__PARSING_PRE_IMPORT_MODULES=False. The log above has been fixed and will be released in 2.6.1