Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Garbage Collection to weather example #974

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

LeePorte
Copy link
Contributor

The existing weather example was resulting in OSError: [Errno 12] ENOMEM when executing subsequent calls to the open-meteo API.

After adding the garbage collection I am no longer seeing these errors and data is being collected as per the timer.

Requesting URL: https://api.open-meteo.com/v1/forecast?latitude=**.******&longitude=-*.*******&current_weather=true&timezone=auto
Data obtained!
Temperature = 17.8°C
Conditions = slight rain
Last Open-Meteo update: 2024-07-24, 19:45
    
Requesting URL: https://api.open-meteo.com/v1/forecast?latitude=**.******&longitude=-*.*******&current_weather=true&timezone=auto
Data obtained!
Temperature = 17.6°C
Conditions = cloudy
Last Open-Meteo update: 2024-07-24, 20:00

Requesting URL: https://api.open-meteo.com/v1/forecast?latitude=**.******&longitude=-*.*******&current_weather=true&timezone=auto
Data obtained!
Temperature = 17.4°C
Conditions = cloudy
Last Open-Meteo update: 2024-07-24, 20:15

The existing weather example was resulting in `OSError: [Errno 12]
ENOMEM` when executing subsequent calls to the open-meteo API.
@Gadgetoid
Copy link
Member

Sorry, and thank you, all the RP2350 and SDK 2.0 stuff has been keeping me busy!

@Gadgetoid Gadgetoid merged commit 3f50bf7 into pimoroni:main Oct 25, 2024
12 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants