update_display.py fails to run when mode is changed in config file and new data is not fetched
jerbzz opened this issue · comments
James Herbert commented
To Reproduce
Set mode to carbon, store data and update display
Then set mode to agile, and update display
Error occurs
Expected behaviour
The missing data should be handled gracefully, perhaps with a reminder to store data first
*Error
Traceback (most recent call last):
File "/home/pi/pi-eco-indicator/./update_display.py", line 67, in <module>
eco_indicator.update_inky(config, data_rows, args.demo)
File "/home/pi/pi-eco-indicator/eco_indicator.py", line 261, in update_inky
high_slots_start_idx = high_slots_list.index(max(high_slots_list))
ValueError: max() arg is an empty sequence