Due to the line
for i in range(2017, date.today().year + 1):
in the cot_all function, the function raises an error each year until the first data becomes available.
This happens because there is no data for the new year yet, but range automatically includes it starting from January 1.
Due to the line
for i in range(2017, date.today().year + 1):
in the cot_all function, the function raises an error each year until the first data becomes available.
This happens because there is no data for the new year yet, but range automatically includes it starting from January 1.