Bugs item #1584589, was opened at 2006-10-25 18:54 Message generated for change (Comment added) made by naudefj You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=446895&aid=1584589&group_id=46652
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: plugins >Group: 1.6.0 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Frank Naude (naudefj) Assigned to: Nobody/Anonymous (nobody) Summary: Weather download fails - empty barometer reading Initial Comment: ERROR parsing forecast data for 'SFXX0044' This could indicate a failed download of weather data from msnbc. You can confirm this by examining the contents of the file '/var/cache/freevo/weather_SFXX0044/data'. Below is also the traceback indicating where we discovered the problem with the weather file. If the weather file appears intact, please report this to the 'freevo-users@lists.sourceforge.net' Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/freevo/plugins/weather.py", line 317, in getForecast self.convertWeatherData() File "/usr/lib/python2.4/site-packages/freevo/plugins/weather.py", line 441, in convertWeatherData self.barometer = toBarometer( self.barometer ) File "/usr/lib/python2.4/site-packages/freevo/plugins/weather.py", line 111, in toBarometer tTemp = float( baro ) ValueError: empty string for float() ---------------------------------------------------------------------- >Comment By: Frank Naude (naudefj) Date: 2006-10-25 19:21 Message: Logged In: YES user_id=143611 Patch to solve this problem: --- freevo-1.6/src/plugins/weather.py (revision 8475) +++ freevo-1.6/src/plugins/weather.py (working copy) @@ -108,7 +108,11 @@ return "%d" % ( int(nTemp),) def toBarometer( baro ): - tTemp = float( baro ) + try: + tTemp = float( baro ) + except ValueError: + tTemp = 0.0 + nTemp = tTemp*3.386 return "%.1f" % (nTemp,) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=446895&aid=1584589&group_id=46652 ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel