tsh56 opened a new issue #13543:
URL: https://github.com/apache/airflow/issues/13543


   I see an error message about incorrect time formats when running airflow 
jobs on kubernetes runners. I'm running based on the apache/airflow:1.10.14 
docker image, which runs using python 3.6.
   
   Error Message:
   `ERROR - time data '2021-01-03T19:26:14Z' does not match format 
'%Y-%m-%dT%H:%M:%S%z'`
   
   The following code only works in python 3.7 and higher.
   `datetime.datetime.strptime('2021-01-03T19:26:14Z', '%Y-%m-%dT%H:%M:%Sz')`
   
   This string format appears to only work for python 3.7 and higher as 
documented in the python changelog for bpo-31800.
   https://docs.python.org/3/whatsnew/changelog.html
   
   
   **Apache Airflow version**:
   1.10.14
   
   
   **Kubernetes version (if you are using kubernetes)** (use `kubectl version`):
   
   **Environment**:
   
   - **Cloud provider or hardware configuration**: AWS
   - **OS** (e.g. from /etc/os-release): airflow docker image
   - **Kernel** (e.g. `uname -a`): NA
   - **Install tools**: NA
   - **Others**: NA
   
   **What happened**:
   `ERROR - time data '2021-01-03T19:26:14Z' does not match format 
'%Y-%m-%dT%H:%M:%S%z'`
   
   **What you expected to happen**:
   The timestamp should be parsed properly for all supported python versions.
   
   **How to reproduce it**:
   Trigger running this code within python 3.6 or within official docker image.
   
   
   **Anything else we need to know**:
   


----------------------------------------------------------------
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]


Reply via email to