Traceback (most recent call last):
File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/app/fw_daily/refresh_cache.py", line 849, in <module>
sys.exit(main())
File "/app/fw_daily/refresh_cache.py", line 817, in main
use_dd=options.use_dd,
File "/app/fw_daily/refresh_cache.py", line 661, in refresh_fw
query_data(refresh_cache, from_dt, to_dt, table_list)
File "/app/fw_daily/refresh_cache.py", line 491, in query_data
query_table(refresh_cache, query_args, table, from_dt, to_dt)
File "/app/fw_daily/refresh_cache.py", line 384, in query_table
last_query_time = get_last_query_time(refresh_cache, last_query_fname)
File "/app/fw_daily/refresh_cache.py", line 217, in get_last_query_time
last_query_time = get_time_from_file(refresh_cache, last_query_fname)
File "/app/fw_daily/refresh_cache.py", line 209, in get_time_from_file
"%Y%m%d",
File "/usr/local/lib/python3.7/_strptime.py", line 577, in _strptime_datetime
tt, fraction, gmtoff_fraction = _strptime(data_string, format)
File "/usr/local/lib/python3.7/_strptime.py", line 359, in _strptime
(data_string, format))
ValueError: time data ' ' does not match format '%Y%m%d'
Traceback (most recent call last):
File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/app/fw_daily/refresh_cache.py", line 858, in <module>
sys.exit(main())
File "/app/fw_daily/refresh_cache.py", line 826, in main
use_dd=options.use_dd,
File "/app/fw_daily/refresh_cache.py", line 670, in refresh_fw
query_data(refresh_cache, from_dt, to_dt, table_list)
File "/app/fw_daily/refresh_cache.py", line 500, in query_data
query_table(refresh_cache, query_args, table, from_dt, to_dt)
File "/app/fw_daily/refresh_cache.py", line 399, in query_table
last_query_time = from_dt if from_dt > last_query_time else last_query_time
TypeError: can't compare datetime.datetime to datetime.date
I have an airflow pipeline for 5 device type stats that has failed. Please see the attached image.
Airflow DAG Failure
As a result, I am unable to generate a firmware report that is needed for aggregate device stats. Upon further inspection in the traceback error logs in the query_fw DAG detailed above, I identify that there are two main errors: a datetime and time data format mismatches.
I have tried changing the timestamp format and reran the python scripts but no changes. Unfortunately, I’m kinda stuck as the result is not working as expected. Any advice on potential solutions would be appreciated!
Thank you!
nandos96 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.