time data %r does not match format %r - python query

Viewed 25

I am getting the below error when running a dag in airflow. I know that the format is obviously does not match the right format but I can't understand why? date_set is the excecute date from airflow, which is entered in the bash command {{ds}}. It has worked in the past so am confused as to why it doesn't like the format now.

Any help would be great thanks!

INFO -  date = dt.datetime.strptime(date_set, '%Y-%m-%d')
INFO -  File "/usr/local/lib/python3.8/_strptime.py", line 568, in _strptime_datetime
INFO -  tt, fraction, gmtoff_fraction = _strptime(data_string, format)
INFO -  File "/usr/local/lib/python3.8/_strptime.py", line 349, in _strptime
INFO -  raise ValueError("time data %r does not match format %r" %
INFO -  ValueError: time data '***' does not match format '%Y-%m-%d'
0 Answers
Related