snjypl commented on PR #29188:
URL: https://github.com/apache/airflow/pull/29188#issuecomment-1405824206
i tried the below code to check the serialization/deserialization:
```
from airflow.models.dagbag import DagBag
from airflow.serialization.serialized_objects import
BaseSerialization,SerializedDAG
dagbag = DagBag('/opt/airflow/dags')
BaseSerialization.deserialize(BaseSerialization.serialize(dagbag.dags))
```
but i got this error:
```
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py",
line 475, in deserialize
return {k: cls.deserialize(v) for k, v in var.items()}
File
"/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py",
line 475, in <dictcomp>
return {k: cls.deserialize(v) for k, v in var.items()}
File
"/home/airflow/.local/lib/python3.7/site-packages/airflow/serialization/serialized_objects.py",
line 471, in deserialize
var = encoded_var[Encoding.VAR]
KeyError: <Encoding.VAR: '__var'>
```
--
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]