Kodi Community Forum
Broken Weather Underground - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Add-on Support (https://forum.kodi.tv/forumdisplay.php?fid=27)
+---- Forum: Weather Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=155)
+---- Thread: Broken Weather Underground (/showthread.php?tid=116668)



RE: [RELEASE] Weather Underground (default xbmc weather addon) - nessus - 2012-05-06

Sorry. No. I have almost the same error...
Code:
05:35:07 T:4556  NOTICE: -->Python Interpreter Initialized<--
05:35:10 T:4556   ERROR: Error Type: <type 'exceptions.TypeError'>
05:35:10 T:4556   ERROR: Error Contents: 'NoneType' object is not iterable
05:35:10 T:4556   ERROR: Traceback (most recent call last):
                                              File "C:\Users\User\AppData\Roaming\XBMC\addons\weather.wunderground\default.py", line 544, in <module>
                                                forecast(location)
                                              File "C:\Users\User\AppData\Roaming\XBMC\addons\weather.wunderground\default.py", line 144, in forecast
                                                properties(data,loc)
                                              File "C:\Users\User\AppData\Roaming\XBMC\addons\weather.wunderground\default.py", line 491, in properties
                                                for item in json_response['result']['files']:
                                            TypeError: 'NoneType' object is not iterable

Also, maybe is from the above error but the day labels in weekend are mixed up

Image


RE: [RELEASE] Weather Underground (default xbmc weather addon) - Martijn - 2012-05-06

I get the same error and I think I know how to fix.

Change line 490 of default.py to:
PHP Code:
if json_response['result']['files']: 



RE: [RELEASE] Weather Underground (default xbmc weather addon) - schumi2004 - 2012-05-06

I see many different screens pass by but i'm not getting them on my system?

I'm using MQ3 skin and eveytime i select weather i'm getting a popup to select a location instead of the screens shown here.
Selecting that location doesn't do anything then.

Any ideas?


RE: [RELEASE] Weather Underground (default xbmc weather addon) - Martijn - 2012-05-06

You already have your location setup i guess?
Try another skin and see if that one does work.


RE: [RELEASE] Weather Underground (default xbmc weather addon) - nessus - 2012-05-06

(2012-05-06, 11:27)Martijn Wrote: I get the same error and I think I know how to fix.

Change line 490 of default.py to:
PHP Code:
if json_response['result']['files']: 

Martijn... that worked. No script error any more although i still have the mixed up day labels in weekend page and some weird high/low temp info in 36hour page if i select "English (US)" in XBMC International settings...

Image


RE: [RELEASE] Weather Underground (default xbmc weather addon) - ronie - 2012-05-06

(2012-05-06, 13:56)nessus Wrote: i still have the mixed up day labels in weekend page

mixed up... mixed up... i'd say different :-)
at least different, to what you expect (or were used to) it to be.


we don't have access to yesterdays (or the day before) weather data, so i can't provide them.
instead, you'll get the forecast for the next weekend.


RE: [RELEASE] Weather Underground (default xbmc weather addon) - ronie - 2012-05-06

weather.wunderground-0.1.9.zip

fixed:
- json error when no image files are found
- 36 hour heading and temp (again, i hope for real this time)
- better detection of systems that use AM/PM time format
- provide windspeeds in beaufort for systems that use it (greek users only afaik)


RE: [RELEASE] Weather Underground (default xbmc weather addon) - nessus - 2012-05-06

You are right about the weekend day labels. My bad. I remember now that weather+ was showing blank the past day's on current weekend.

There still some other typo problems when changing international settings but i will stop now to bothering you more with this .

Thanks

Cheers
Nessus


RE: [RELEASE] Weather Underground (default xbmc weather addon) - ronie - 2012-05-06

(2012-05-06, 21:49)nessus Wrote: There still some other typo problems when changing international settings but i will stop now to bothering you more with this .

oh, no please don't... if there's any issues,
no matter how small, i'd like to know about it.

and thx for all the testing & reporting you've done so far :-)


RE: [RELEASE] Weather Underground (default xbmc weather addon) - dnairb - 2012-05-06

In the 10 Day, Weekend, and Hourly screens, wind speed is reported in mp/h; in the 36 Hour screen, however, wind speed is reported in km/h.
This is probably a localisation issue?


RE: [RELEASE] Weather Underground (default xbmc weather addon) - ronie - 2012-05-06

(2012-05-06, 22:01)dnairb Wrote: In the 10 Day, Weekend, and Hourly screens, wind speed is reported in mp/h; in the 36 Hour screen, however, wind speed is reported in km/h.
This is probably a localisation issue?

that's for a location in england i guess?

wunderground provides the 36 hour forecast in either '°C & km/h' or '°F & mph' format.
this works for everyone, except for the brits, who insist on using '°C & mph' ;-)

i'll try if i can use some trickery in the script to handle the conversion for UK based locations.


RE: [RELEASE] Weather Underground (default xbmc weather addon) - dnairb - 2012-05-06

It is in UK, yes. The localisation works OK with the 10 day, weekend and hourly screens, just not on the 36 hour screen.


RE: [RELEASE] Weather Underground (default xbmc weather addon) - nessus - 2012-05-06

(2012-05-06, 21:53)ronie Wrote:
(2012-05-06, 21:49)nessus Wrote: There still some other typo problems when changing international settings but i will stop now to bothering you more with this .

oh, no please don't... if there's any issues,
no matter how small, i'd like to know about it.

and thx for all the testing & reporting you've done so far :-)

In that case here some screens of what i think there are errors. I marked with red circle what i think is wrong.

These are with International Settings set to "Greek" :
Image
Image


This is with International Settings set to "English (US)" :
Image


This is with International Settings set to "English" :
Image


RE: [RELEASE] Weather Underground (default xbmc weather addon) - ronie - 2012-05-07

@nessus:

the first two screenshots:
- as far as i understand, (you obviously would know better than me),
windspeeds in greece are reported in beaufort. so please let me know why you think Bft is incorrect.

- 'Variable' is indeed not translated. we can blame wunderground for not localizing this string.
we can blame xbmc as well, as it also tries to localize strings on the weather screen.
problem is, we still have the weather.com strings in our language files and they used 'VAR'.
other then that, if you switch to a greek location (i've tested with Athens), wunderground does provide proper localized strings

- AM/PM, that's indeed the script's fault. i could try to fix that.
how should greek time be displayed? as '6:20πμ / 9:13μμ' or just '6:20 / 9:13' ?


last two screenshots:
wundergound doesn't provide the individual 36hour.header and 36hour.temp values.
i have to extract them from the forecast text:

Image

so far, i can't think of any other way to do this, so it's the best i can do for now.


RE: [RELEASE] Weather Underground (default xbmc weather addon) - nessus - 2012-05-07

Ronie... indeed wind speeds in Greece are reported in Beaufort ("Μποφόρ" in Greek). I've marked "Variable", "Beaufort", "Bft" just for localizing reasons. If that is not script depended never mind then. IMO "Beaufort" metric is not needed if is not localized/translated. Reading a sentence of 5-6 words in two languages is not easy looking.

The Greek time is displayed like you say : 6:20πμ / 9:13μμ but also a 24h look (6:20 / 21:13) it will be fine and more universal in all languages.

I had no idea that you take the values for 36hour.header and 36hour.temp from there. In that case is ok.

Cheers
Nessus