Skip to content

datetime in parameters cause "TypeError: Object of type set is not JSON serializable" #19519

Description

@ajbosco

Apache Airflow version

2.2.2rc1

Operating System

Debian Buster (docker)

Versions of Apache Airflow Providers

n/a

Deployment

Other 3rd-party Helm chart

Deployment details

No response

What happened

The DAG parses and runs fine on 2.1.3, but when we upgrade to the latest version it fails to import:

Broken DAG: [/usr/local/airflow/dags/test_dag.py] Traceback (most recent call last):
  File "/usr/local/lib/python3.8/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/usr/local/lib/python3.8/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type datetime is not JSON serializable

What you expected to happen

No response

How to reproduce

No response

Anything else

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions