[Mongodb Connection] AttributeError: 'bool' object has no attribute 'lower' #42930
Closed
1 of 2 tasks
Labels
area:providers
good first issue
kind:bug
This is a clearly a bug
needs-triage
label for new issues that we didn't triage yet
provider:mongo
Apache Airflow Provider(s)
mongo
Versions of Apache Airflow Providers
No response
Apache Airflow version
2.10.2
Operating System
Redhat 9
Deployment
Virtualenv installation
Deployment details
No response
What happened
I create a new mongo connection on Airflow with the following input:
When I try to call the connection on my task on Airflow:
I have this error:
[2024-10-11, 08:44:07 UTC] {base.py:84} INFO - Retrieving connection 'QDATALAKE'
[2024-10-11, 08:44:07 UTC] {taskinstance.py:3310} ERROR - Task failed with exception
Traceback (most recent call last):
File "/opt/airflow/venv/lib/python3.9/site-packages/airflow/models/taskinstance.py", line 767, in _execute_task
result = _execute_callable(context=context, **execute_callable_kwargs)
File "/opt/airflow/venv/lib/python3.9/site-packages/airflow/models/taskinstance.py", line 733, in _execute_callable
return ExecutionCallableRunner(
File "/opt/airflow/venv/lib/python3.9/site-packages/airflow/utils/operator_helpers.py", line 252, in run
return self.func(*args, **kwargs)
File "/opt/airflow/venv/lib/python3.9/site-packages/airflow/models/baseoperator.py", line 406, in wrapper
return func(self, *args, **kwargs)
File "/opt/airflow/venv/lib/python3.9/site-packages/airflow/decorators/base.py", line 266, in execute
return_value = super().execute(context)
File "/opt/airflow/venv/lib/python3.9/site-packages/airflow/models/baseoperator.py", line 406, in wrapper
return func(self, *args, **kwargs)
File "/opt/airflow/venv/lib/python3.9/site-packages/airflow/operators/python.py", line 238, in execute
return_value = self.execute_callable()
File "/opt/airflow/venv/lib/python3.9/site-packages/airflow/operators/python.py", line 256, in execute_callable
return runner.run(*self.op_args, **self.op_kwargs)
File "/opt/airflow/venv/lib/python3.9/site-packages/airflow/utils/operator_helpers.py", line 252, in run
return self.func(*args, **kwargs)
File "/opt/airflow/dags/Erebia_Datalake_Source_Manuel.py", line 42, in drop_table_from_mongo
mongo_conn = MongoHook(conn_id='QDATALAKE')
File "/opt/airflow/venv/lib/python3.9/site-packages/airflow/providers/mongo/hooks/mongo.py", line 139, in init
self.allow_insecure = self.extras.pop("allow_insecure", "false").lower() == "true"
AttributeError: 'bool' object has no attribute 'lower'
What you think should happen instead
No response
How to reproduce
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: