The Error does not seem to be xcom error.
--
You received this message because you are subscribed to the Google Groups "cloud-composer-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
cloud-composer-di...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/cloud-composer-discuss/87b2b5ca-1143-4741-9a54-9306754703e1%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to cloud-composer-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cloud-composer-discuss/87b2b5ca-1143-4741-9a54-9306754703e1%40googlegroups.com.
import datetime
import json
class DateTimeEncoder(json.JSONEncoder):
"""JSON Encoder which supports encoding datetime objects"""
def default(self, obj): # type: ignore
"""Support datetime encoding"""
if isinstance(obj, (datetime.datetime, datetime.date, datetime.time)):
return obj.isoformat()
elif isinstance(obj, datetime.timedelta):
return (datetime.datetime.min + obj).time().isoformat()
def set_json_default_encoder() -> None:
"""Sets the default JSON encoder to DateTimeEncoder"""
json._default_encoder = DateTimeEncoder() # type: ignore