optimuspaul opened a new issue #8281: CLI trigger_dag raises TypeError: Object of type Pendulum is not JSON serializable URL: https://github.com/apache/airflow/issues/8281 **Apache Airflow version**: 1.10.9 **Kubernetes version (if you are using kubernetes)** (use `kubectl version`): v1.15.11 **Environment**: - **OS** (e.g. from /etc/os-release): Pop!_OS 19.10 - **Kernel** (e.g. `uname -a`): Linux wildflower-tech-gpu-002 5.3.0-7625-generic #27~1576774560~19.10~f432cd8-Ubuntu SMP Thu Dec 19 20:35:37 UTC x86_64 x86_64 x86_64 GNU/Linux - **Install tools**: - **Others**: **What happened**: running `airflow trigger_dag -e <some date> <dag_id>` produces error. ``` Traceback (most recent call last): File "/usr/local/bin/airflow", line 37, in <module> args.func(args) File "/usr/local/lib/python3.7/site-packages/airflow/utils/cli.py", line 75, in wrapper return f(*args, **kwargs) File "/usr/local/lib/python3.7/site-packages/airflow/bin/cli.py", line 237, in trigger_dag execution_date=args.exec_date) File "/usr/local/lib/python3.7/site-packages/airflow/api/client/json_client.py", line 57, in trigger_dag "execution_date": execution_date, File "/usr/local/lib/python3.7/site-packages/airflow/api/client/json_client.py", line 38, in _request resp = getattr(requests, method.lower())(**params) # pylint: disable=not-callable File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 119, in post return request('post', url, data=data, json=json, **kwargs) File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 61, in request return session.request(method=method, url=url, **kwargs) File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 516, in request prep = self.prepare_request(req) File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 459, in prepare_request hooks=merge_hooks(request.hooks, self.hooks), File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 317, in prepare self.prepare_body(data, files, json) File "/usr/local/lib/python3.7/site-packages/requests/models.py", line 467, in prepare_body body = complexjson.dumps(json) File "/usr/local/lib/python3.7/json/__init__.py", line 231, in dumps return _default_encoder.encode(obj) File "/usr/local/lib/python3.7/json/encoder.py", line 199, in encode chunks = self.iterencode(o, _one_shot=True) File "/usr/local/lib/python3.7/json/encoder.py", line 257, in iterencode return _iterencode(o, 0) File "/usr/local/lib/python3.7/json/encoder.py", line 179, in default raise TypeError(f'Object of type {o.__class__.__name__} ' TypeError: Object of type Pendulum is not JSON serializable ``` **What you expected to happen**: a dag execution to be triggered **How to reproduce it**: - get airflow running on kube like thing. - exec into pod with airflow - run command airflow trigger_dag -e <some date> <dag_id>` with plausible values **Anything else we need to know**: happens every time, never had it work successfully. I can trigger from the UI but not with the specificity I need.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
