So i go with the arg day=31 to make clear i want all data, but that is going to an error
python3 get_zappi_history.py --month=08 --show-month --day=31
Traceback (most recent call last):
File "get_zappi_history.py", line 217, in
main()
File "get_zappi_history.py", line 108, in main
for dom in range(1, day.tm_mday + 1):
TypeError: can only concatenate str (not "int") to str
I could fix the issue by
elif show_month:
all_data = []
for dom in range(1, int(day.tm_mday) + 1):
This seems to work for everything but I have to say that I am a complete python noob.
Maybe it would be better to have --show-month always checking the max day of the month argument and giving this value as the day argument.
I just wanted to fetch data for last month and struggled to find, that he is just taking the first 2 days in the output.
So i go with the arg day=31 to make clear i want all data, but that is going to an error
I could fix the issue by
This seems to work for everything but I have to say that I am a complete python noob. Maybe it would be better to have
--show-month
always checking the max day of the month argument and giving this value as the day argument.