SIP
Issue with weather_level_adj plugin after update - Printable Version

+- SIP (https://nosack.com/sipforum)
+-- Forum: SIP (Sustainable Irrigation Platform) (https://nosack.com/sipforum/forumdisplay.php?fid=1)
+--- Forum: Report a problem (https://nosack.com/sipforum/forumdisplay.php?fid=9)
+--- Thread: Issue with weather_level_adj plugin after update (/showthread.php?tid=61)



Issue with weather_level_adj plugin after update - MrCmonster - 2016 Nov 07

Since the latest SIP update which I installed yesterday Nov 06 2016, I'm getting an error from the weather_level_adj plugin. I have my location in Options set as pws:STATIONID (replaced with my station ID of course).

The error I'm getting is:

Code:
Weather-base water level encountered error:
Traceback (most recent call last):
 File "/home/pi/SIP/plugins/weather_level_adj.py", line 86, in run
   forecast = forecast_info(self)
 File "/home/pi/SIP/plugins/weather_level_adj.py", line 387, in forecast_info
   'rain_mm': float(day_info['qpf_allday']['mm']),
TypeError: float() argument must be a string or a number

Any help debugging this would be great. The plugin does still work correctly if I put in my zip code, but I'd prefer to use my own personal weather station as I have been. Smile

Thanks!


RE: Issue with weather_level_adj plugin after update - MrCmonster - 2016 Nov 08

Fixed my own issue after a lot of digging. Wunderground sometimes returns - instead of 0 especially for the daily rain amount. I updated the plugin code to keep those instances from causing an error in the plugin. I've submitted a pull request to update the plugin. https://github.com/Dan-in-CA/sip_plugins/pull/19


RE: Issue with weather_level_adj plugin after update - dan - 2016 Nov 08

Super!
Glad you found the problem. I merged your update on the GitHub plugins repo.

Dan