parthpalkhiwala-vonage commented on issue #20875:
URL: https://github.com/apache/airflow/issues/20875#issuecomment-1134486949
Hello All,
We are still facing a similar issuing while upgrading our airflow version
from 2.1.3 to 2.2.5
Below is the error we are getting - this usually occurs after task execution
and not during DAG parsing by the scheduler.
**Apache Airlfow Version : 2.2.5**
**Python Version : 3.6**
`File
"/usr/local/lib/python3.6/site-packages/airflow/serialization/serialized_objects.py",
line 578, in serialize_operator
serialize_op['params'] = cls._serialize_params_dict(op.params)
File
"/usr/local/lib/python3.6/site-packages/airflow/serialization/serialized_objects.py",
line 451, in _serialize_params_dict
if f'{v.__module__}.{v.__class__.__name__}' ==
'airflow.models.param.Param':
AttributeError: 'str' object has no attribute '__module__'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/usr/local/lib/python3.6/site-packages/airflow/serialization/serialized_objects.py",
line 939, in to_dict
json_dict = {"__version": cls.SERIALIZER_VERSION, "dag":
cls.serialize_dag(var)}
File
"/usr/local/lib/python3.6/site-packages/airflow/serialization/serialized_objects.py",
line 851, in serialize_dag
raise SerializationError(f'Failed to serialize DAG {dag.dag_id!r}: {e}')
airflow.exceptions.SerializationError: Failed to serialize DAG : 'str'
object has no attribute '__module__'`
We are passing the params at task Level like
**_params={'param_name': 'param_val'}_**
We have also tried using
**_params={'param_name': Param('param_val')}_**
Can anyone please guide us how to fix this error?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]