frodo2000 opened a new issue #20636:
URL: https://github.com/apache/airflow/issues/20636
### Apache Airflow version
2.2.3 (latest released)
### What happened
After upgrade to 2.2.3 one of DAGs could not be serialized due to the
following error;
Broken DAG: [/opt/airflow/dags/ImamRefresh_DAG.py] Traceback (most recent
call last):
File
"/home/airflow/airflow_venv/lib64/python3.6/site-packages/airflow/serialization/serialized_objects.py",
line 574, in serialize_operator
serialize_op['params'] = cls._serialize_params_dict(op.params)
File
"/home/airflow/airflow_venv/lib64/python3.6/site-packages/airflow/serialization/serialized_objects.py",
line 447, 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
"/home/airflow/airflow_venv/lib64/python3.6/site-packages/airflow/serialization/serialized_objects.py",
line 935, in to_dict
json_dict = {"__version": cls.SERIALIZER_VERSION, "dag":
cls.serialize_dag(var)}
File
"/home/airflow/airflow_venv/lib64/python3.6/site-packages/airflow/serialization/serialized_objects.py",
line 847, in serialize_dag
raise SerializationError(f'Failed to serialize DAG {dag.dag_id!r}: {e}')
airflow.exceptions.SerializationError: Failed to serialize DAG
'ImamRefresh_DAG': 'str' object has no attribute '__module__'
### What you expected to happen
_No response_
### How to reproduce
Problem is caused by user operator that contains self.params variable. At
least documentation for developers should be extended by that informaiton.
### Operating System
RHEL 8
### Versions of Apache Airflow Providers
_No response_
### Deployment
Virtualenv installation
### Deployment details
_No response_
### 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]