Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The code apparently broke when a new column was added to the CSV data to show the number of boosters. This field is blank in the US data, so the code would crash trying to turn the empty string into an integer.
Since upstream seems to add columns at the far right (a sensible choice) we should index using positive numbers instead.
This also changes the code so that in the event of a failure it actually DOES retry. I designed it to wait for 1 hour in deep sleep before retrying, so that it doesn't immediately run down the battery in case of transient errors.
Note that if you test this code with version 7 prereleases at least up to beta.0, you may be affected by a CircuitPython bug:
this bug can cause a very inconvenient boot loop.