Skip to content

update_display.py fails to run when mode is changed in config file and new data is not fetched #25

Description

@jerbzz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions