You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "GMakd (via GitHub)" <gi...@apache.org> on 2024/01/02 10:48:47 UTC

[I] TypeError: 'module' object is not callable [airflow]

GMakd opened a new issue, #36524:
URL: https://github.com/apache/airflow/issues/36524

   ### Apache Airflow version
   
   Other Airflow 2 version (please specify below)
   
   ### If "Other Airflow 2 version" selected, which one?
   
   2.7.2
   
   ### What happened?
   
   Traceback (most recent call last):
     File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/airflow/settings.py", line 55, in <module>
       TIMEZONE = pendulum.tz.timezone(tz)
                  ^^^^^^^^^^^^^^^^^^^^^^^^
   TypeError: 'module' object is not callable
   
   During handling of the above exception, another exception occurred:
   
   Traceback (most recent call last):
     File "/Library/Frameworks/Python.framework/Versions/3.12/bin/airflow", line 5, in <module>
       from airflow.__main__ import main
     File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/airflow/__init__.py", line 52, in <module>
       from airflow import configuration, settings
     File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/airflow/configuration.py", line 2340, in <module>
       secrets_backend_list = initialize_secrets_backends()
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/airflow/configuration.py", line 2254, in initialize_secrets_backends
       secrets_backend_cls = import_string(class_name)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/airflow/utils/module_loading.py", line 37, in import_string
       module = import_module(module_path)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/__init__.py", line 90, in import_module
       return _bootstrap._gcd_import(name[level:], package, level)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/airflow/secrets/metastore.py", line 29, in <module>
       from airflow.utils.session import NEW_SESSION, provide_session
     File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/airflow/utils/session.py", line 24, in <module>
       from airflow import settings
     File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/airflow/settings.py", line 57, in <module>
       TIMEZONE = pendulum.tz.timezone("UTC")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   TypeError: 'module' object is not callable
   
   ### What you think should happen instead?
   
   _No response_
   
   ### How to reproduce
   
   ~ % airflow webserver -p 8080
   
   ### Operating System
   
   macOS-14.2.1-arm64-arm-64bit
   
   ### Versions of Apache Airflow Providers
   
   apache-airflow-providers-common-sql==1.10.0
   apache-airflow-providers-ftp==3.7.0
   apache-airflow-providers-http==4.8.0
   apache-airflow-providers-imap==3.5.0
   apache-airflow-providers-sqlite==3.7.0
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   Local installation with python 3.12.1
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] TypeError: 'module' object is not callable [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #36524:
URL: https://github.com/apache/airflow/issues/36524#issuecomment-1874127317

   Airfow Does not work on Python 3.12 (see prerequisites). One of the reason is migration to Pendulum 3 which is in progress https://github.com/apache/airflow/pull/36281  - if you want to help with that by reviews and testing of that PR, you are most welcome.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] TypeError: 'module' object is not callable [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk closed issue #36524: TypeError: 'module' object is not callable
URL: https://github.com/apache/airflow/issues/36524


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] TypeError: 'module' object is not callable [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #36524:
URL: https://github.com/apache/airflow/issues/36524#issuecomment-1874626272

   >  but it was not obvious.
   
   Of course it was not.
   
   That's exactly why we explain and recommend our users that they should use constraints. Many of the issues caused by incompatible dependencies produce non-obvious errors and following our recommendations on how you should install Airflow is a good way to avoid those kind of problems - which are inherently impossible to prevent in Python ecosystem when your application has 650+ dependencies.
   
   We even did not stop at the documentation and went ahead and explained more details why it is like that and why you should use constraints in a few talks. This is the one I gave at Airflow Summit, explaining some whys:
   
   https://airflowsummit.org/sessions/2023/mastering-dependencies-the-airflow-way/


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] TypeError: 'module' object is not callable [airflow]

Posted by "GMakd (via GitHub)" <gi...@apache.org>.
GMakd commented on issue #36524:
URL: https://github.com/apache/airflow/issues/36524#issuecomment-1874610415

   I appreciate your feedback.
   Currently, I don't have anything urgent because Python 3.12 is not yet in production. I am testing to make sure things work before updating my workflows and pipelines later.
   I have tried to search for the issue, but it was not obvious.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] TypeError: 'module' object is not callable [airflow]

Posted by "GMakd (via GitHub)" <gi...@apache.org>.
GMakd commented on issue #36524:
URL: https://github.com/apache/airflow/issues/36524#issuecomment-1874361498

   Usually I get an error when installing if requirements are not satisfied (e.g  python 3.12 is not supported).
   I will investigate the issue in detail and see what I can do to solve it.
   I appreciate your time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] TypeError: 'module' object is not callable [airflow]

Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #36524:
URL: https://github.com/apache/airflow/issues/36524#issuecomment-1873869984

   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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] TypeError: 'module' object is not callable [airflow]

Posted by "GMakd (via GitHub)" <gi...@apache.org>.
GMakd commented on issue #36524:
URL: https://github.com/apache/airflow/issues/36524#issuecomment-1874658497

   Thank you for bringing this to my attention. I anticipate that there may be some challenges ahead, but nonetheless, I truly appreciate the time and effort invested in this project. It's unique and comprehensive in many ways. I look forward to working together to make it even better.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] TypeError: 'module' object is not callable [airflow]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #36524:
URL: https://github.com/apache/airflow/issues/36524#issuecomment-1874529844

   > Usually I get an error when installing if requirements are not satisfied (e.g python 3.12 is not supported). I will investigate the issue in detail and see what I can do to solve it. I appreciate your time.
   
   Yes. It works if you have crystal ball and can foresee that future versions of things will not get supported. 2.7.2 was released around the time Python 3..12 and (as you might read in release notes) 2.7.3 was already released with < 3.12 limit - this is why you likely got 2.7.2 installed.  https://airflow.apache.org/docs/apache-airflow/stable/release_notes.html#airflow-2-7-2-2023-10-12 
   
   Usually it's a good idea to read the documentation when you install software. You would have also learned that you should use constraints to install airflow in reproducible way - https://airflow.apache.org/docs/apache-airflow/stable/installation/installing-from-pypi.html  and you would have found that there are no constraints for 3.12 for any Airflow version (including 2.7.2) - which is a very clear indication that it is not supported.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org