I have also found the weather plugin to not work all the time. It seems to not
handle incomplete data very well. Maybe only Australian weather stations
produce incomplete data? ;-)
I am novice when it comes to freevo and python (actually I've never written
any python before now), but I was able to hack the code to be a bit more
forgiving about the data it receives. See the diff output below...
I hope someone with a bit more know-how can look at these changes and
incorporate them into the next release of the weather plugin.
regards
geoff
=== versions
freevo: 1.5.4
weather plugin: 0.8
=== the problems
* having an empty swVis field causes an exception when trying to convert it to
a float. (line 251)
* having both an empty swConText and swCIcon fields causes an exception when
trying to find the weather type.
=== diff weather.py.bak weather.py
251c251,253
< if float(self.visibility) == 999.00:
---
> if self.visibility is None or len(self.visibility) == 0:
> return _("")
> elif float(self.visibility) == 999.00:
429a432,434
> if self.curIcon is None or len(self.curIcon) == 0:
> self.curIcon = "unknown"
>
858c863
< if float(self.parent.weather.visibility) == 999.00:
---
> if self.parent.weather.getVisibility() == _("Unlimited"):
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Freevo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-users