-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
If Aeris throws an exception Belchertown doesn't update #904
Comments
I don't know if this helps you but I wonder if the problem is caused by your use of the forecast extension. You don’t need it to be able to access Aeris forecasts from the Belchertown skin. I am not familiar with the forecast extension, the number of calls it makes to Aeris or the limit set by your access method to Aeris. |
No, it isn't related to the use of the forecast extension. It was because I had a bug in the refresh rate on Belchertown that was fetching the forecast once per minute. Once fixed the problem doesn't reproduce and still, I didn't expect Belchertown to just fail so completely when the forecast from Aeris failed. That is what I consider the root problem here. |
It's unlikely to occur under normal conditions, but otherwise fair point. Let's see if anyone with better python skills than me can provide a fix for the error conditions that Aeris can produce. |
I agree 100%. I've not got the python chops to fix it either. |
Um - this code looks funky to me.
Specifically a boolean appears to be checked for being greater than 300 from an C++ programmers POV wouldn't you check the time difference to be > 300, and the strftime to be cast to an int and then compared to the value 5? Could someone explain this logic please? |
I had this recently, wish I had seen this report before lots of fiddling around with the Pi & WeeWx to try to nail the issue. I also am not good enough at Python to fix it! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
First step
install weewx, belchertown, and the forecast extension.
Describe the bug
It appears that belchertown doesn't expect the exception from aeris and just aborts page generation, rather it should put up some kind of error entry "Aeris forecast not available", as an example.
Link to your website (IMPORTANT)
http://www.kdbarto.org/weather/belchertown
Version of the skin you're using
1.3.1
To Reproduce
Steps to reproduce the behavior:
Run and re-run aeris forecast until you have used all your free connections in a day.
Restart weewx
Note that Belchertown no longer updates because of the thrown exception getting the aeris forecast.
Expected behavior
What would be nice is to have a default "Aeris forecast is unavailable "
In this cast the would say "Too Many Requests"
Screenshots
Device Information (please complete the following information):
MacOS 12.6.8
Weewx 4.10.2
Python 3.11.5
Forecast extension from https://github.com/chaunceygardiner/weewx-forecast
The text was updated successfully, but these errors were encountered: