Christian Lyra wrote:
> Hi there,
> 
> As requested on error message, I´m sending the error to mailing list:
> 
> Weather download:  
> http://www.msnbc.com/m/chnk/d/weather_d_src.asp?acid=BRXX0079 - 1.3 sec
> Weather download:  
> http://w3.weather.com/weather/map/BRXX0079?from=LAPmaps - 1.9 sec
> Weather download:  
> http://w3.weather.com//maps/local/local/br/1a/index_large.html - 0.8 
> sec
> Weather download:  
> http://image.weather.com/images/sat/nebrazilsat_720x486.jpg - 1.4 sec
> ERROR parsing forecast data for 'BRXX0079'
>         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_BRXX0079/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 434, in getForecast
>     self.convertWeatherData()
>   File "/usr/lib/python2.4/site-packages/freevo/plugins/weather.py", 
> line 524, in convertWeatherData
>     self.city    = self.GetString("this.swCity")
>   File "/usr/lib/python2.4/site-packages/freevo/plugins/weather.py", 
> line 454, in GetString
>     (start, end) = results.span()
> AttributeError: 'NoneType' object has no attribute 'span'
> ----
> 
> My guess is they change the url. Freevo tries to fetch this 
> http://www.msnbc.com/m/chnk/d/weather_d_src.asp?acid=BRXX0079, and the 
> correct should be
> http://weather.msn.com/local.aspx?wealocations=wc:BRXX0079
> 

I agree that the url has changed but this is not the correct location.
The url should return something like:
function makeWeatherObj() {

 this.swCity = "Zurich";
 this.swSubDiv = "";
 this.swCountry = "Switzerland";
 this.swRegion = "West Europe";
 this.swTemp = "52";
 this.swTempCel = Math.round((5/9)*(this.swTemp-32));
 this.swCIcon = "27";
 this.swWindS = "6";
 this.swWindD = "N";
 this.swBaro = "29.94";
 this.swHumid = "54";
 this.swReal = "52";
 this.swUV = "0";
 this.swVis = "6.21";
 this.swLastUp = "03/28/2007 12:50:00";
 this.swConText = "Mostly Cloudy";
 this.swFore =
"5|6|7|1|2|03/29/2007|03/30/2007|03/31/2007|04/01/2007|04/02/2007|11|39|11|30|32|14|19|13|4|24|59|55|58|64|65|60|40|60|20|10|29|11|27|29|31|4|13|3|4|11|35|34|34|39|40|";

 this.swAcid = "SZXX0033";
}

It is this data that is then parsed for the weather information.

If the correct link can be found then self.dataurl in plugins/weather.py
needs to be changed.

Having done a quick google I've not found a suitable link yet.

Duncan


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freevo-users mailing list
Freevo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freevo-users

Reply via email to