I am facing a issue wherein it is not able to import the airflow modules properly giving the below error. Could someone please help me understand it
10:39:36 ERROR: FileIngestion.test_download_file_mercury (unittest.loader._FailedTest.FileIngestion.test_download_file_mercury)
10:39:36 ----------------------------------------------------------------------
10:39:36 ImportError: Failed to import test module: FileIngestion.test_download_file_mercury
10:39:36 Traceback (most recent call last):
10:39:36 File "/opt/managed-artifacts/python/3.11.6/lib/python3.11/unittest/loader.py", line 419, in _find_test_path
10:39:36 module = self._get_module_from_name(name)
10:39:36 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10:39:36 File "/opt/managed-artifacts/python/3.11.6/lib/python3.11/unittest/loader.py", line 362, in _get_module_from_name
10:39:36 __import__(name)
10:39:36 File "/jenkins/workspace/dataaws-1417_web_proxy_migration/PythonUtils/test/FileIngestion/test_download_file_mercury.py", line 6, in <module>
10:39:36 from PythonUtils.src.FileIngestion import download_file_mercury
10:39:36 File "/jenkins/workspace/dataaws-1417_web_proxy_migration/PythonUtils/src/FileIngestion/download_file_mercury.py", line 2, in <module>
10:39:36 from PythonUtils.src.common.hooks.audit_service import AuditServiceHook
10:39:36 File "/jenkins/workspace/dataaws-1417_web_proxy_migration/PythonUtils/src/common/hooks/audit_service.py", line 6, in <module>
10:39:36 from airflow.utils.log.logging_mixin import LoggingMixin
10:39:36 File "/jenkins/python/lib/python3.11/site-packages/airflow/__init__.py", line 52, in <module>
10:39:36 from airflow import configuration
10:39:36 File "/jenkins/python/lib/python3.11/site-packages/airflow/configuration.py", line 1815, in <module>
10:39:36 secrets_backend_list = initialize_secrets_backends()
10:39:36 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10:39:36 File "/jenkins/python/lib/python3.11/site-packages/airflow/configuration.py", line 1743, in initialize_secrets_backends
10:39:36 secrets_backend_cls = import_string(class_name)
10:39:36 ^^^^^^^^^^^^^^^^^^^^^^^^^
10:39:36 File "/jenkins/python/lib/python3.11/site-packages/airflow/utils/module_loading.py", line 36, in import_string
10:39:36 module = import_module(module_path)
10:39:36 ^^^^^^^^^^^^^^^^^^^^^^^^^^
10:39:36 File "/opt/managed-artifacts/python/3.11.6/lib/python3.11/importlib/__init__.py", line 126, in import_module
10:39:36 return _bootstrap._gcd_import(name[level:], package, level)
10:39:36 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
10:39:36 File "/jenkins/python/lib/python3.11/site-packages/airflow/secrets/metastore.py", line 28, in <module>
10:39:36 from airflow.utils.session import NEW_SESSION, provide_session
10:39:36 File "/jenkins/python/lib/python3.11/site-packages/airflow/utils/session.py", line 24, in <module>
10:39:36 from airflow import settings
10:39:36 File "/jenkins/python/lib/python3.11/site-packages/airflow/settings.py", line 51, in <module>
10:39:36 TIMEZONE = pendulum.tz.timezone("UTC")
10:39:36 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
10:39:36 TypeError: 'module' object is not callable
I tried updating the airflow version but same error is coming. Currently i am using airflow version 2.5.3
apache-airflow==2.5.3
but it seems to be solved inapache-airflow==2.8.0
– Fundamentpendulum
version? – Hexylresorcinol