orzZXY opened a new issue #10795: URL: https://github.com/apache/airflow/issues/10795
**Apache Airflow version**: 1.10.10 **Kubernetes version (if you are using kubernetes)** (use `kubectl version`): **Environment**: python 3.7.6 - **Cloud provider or hardware configuration**: AWS m4.xlarge - **OS** (e.g. from /etc/os-release): Amazon Linux - **Kernel** (e.g. `uname -a`): Linux ****.amzn2.x86_64 #1 SMP *** UTC 2020 x86_64 x86_64 x86_64 GNU/Linux - **Install tools**: pip3 - **Others**: **What happened**: airflow backfill your_dag –s yyyy-mm-ddTHH:MM:00 –e yyyy-mm-ddTHH:MM:00` it would return the error `Python 'pendulum' cannot be converted to a MySQL type`, however, if you run the same command again, it would succeed. In other words, the error happens every first time you run the command. Which means, though there is an error raised when you query/update the MySQL cluster, somehow it actually works A solution that I figured out: You need to modify /usr/local/lib/python3.7/site-packages/airflow/models/dagrun.py Replace exec_date = func.cast(self.execution_date, DateTime) TO from airflow.utils.timezone import make_naive exec_date = func.cast(make_naive(self.execution_date), DateTime) ---------------------------------------------------------------- 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]
