2.10.3 raises AttributeError: partially initialized module 'airflow' has no attribute 'utils' (most likely due to a circular import) #43971
-
Hello! I am trying to update Airflow to 2.10.3 from 2.10.2 to resolve a Dependabot finding, but I am getting these errors when trying to run my test suite, pasted below. I am a little stumped, but maybe this is related to #43334 ? I don't get these errors on 2.10.1 or 2.10.2 Any help to get things working again would be much appreciated. I am sure there is just a setting that I have missed. I am using docker-compose with environment variables and not a conf file, and I confirmed that I am using: Please let me know what info I can provide to help arrive at a solution.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I'm having this same issue. Did you find a fix for this? |
Beta Was this translation helpful? Give feedback.
-
Try 2.10.4rc1 -> that should be fixed. There was the unconditional deprecation warning accidentally generated in 2.10.3 and you seem to have custom logger importing stuff from airflow - since that warning is generated during importing, your logger attempts to import some module from airflow while it is partially imported and it creates recursive import error. You can - possilbbly workaround it also by figuring which custom import on your side triggers it, and turn it into local import - in case it is a "top-level` import in a pytho file - this usually help. |
Beta Was this translation helpful? Give feedback.
Try 2.10.4rc1 -> that should be fixed. There was the unconditional deprecation warning accidentally generated in 2.10.3 and you seem to have custom logger importing stuff from airflow - since that warning is generated during importing, your logger attempts to import some module from airflow while it is partially imported and it creates recursive import error.
You can - possilbbly workaround it also by figuring which custom import on your side triggers it, and turn it into local import - in case it is a "top-level` import in a pytho file - this usually help.