pimoroni / enviro

MIT License
101 stars 79 forks source link

Error in Enviro Urban if set to never upload data #205

Open twVolc opened 7 months ago

twVolc commented 7 months ago

When using the walk-through setup on the Enviro Urban I selected that I didn't ever want readings uploaded. I was having issues with the instrument working - it was continuously pulsing after it's first start-up. I tried to run main.py (all as it came shipped - I had made no edits) from Thonny and got this error:

Traceback (most recent call last):
  File "<stdin>", line 87, in <module>
TypeError: unsupported types for __ge__: 'int', 'str'

which relates to the line

if cache_file_count >= config.upload_frequency:

The error seems to be because config.py has the line upload_frequency = ''. Presumably the walk-through setup and associated code needs editing to make this all compatible for if people don't want to upload data - either a string check on line 87 or instead using an unattainably high value instead of '' in the config file.