[RELEASE] OzWeather - Australian Weather Addon using BOM data

  Thread Rating:
  • 3 Votes - 4.33 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
bossanova808 Offline
Donor
Posts: 2,297
Joined: Sep 2009
Reputation: 36
Location: Melbourne, Australia
Post: #181
I can probably get it to just try in there as an alternative if the normal spot fails...can't hurt really.

I need to look at the code a bit as well to get it to refresh the bg images if > 1 month has passed or whatever, as at the moment it just gets them once and then tests if they are there and skips over if they are - meaning it would never get updated images, for example. When I do that I will look into this alternate source issue....but very busy right now with work...

My XBMC stuff:
find quote
wrxtasy Offline
Senior Member
Posts: 228
Joined: Feb 2012
Reputation: 3
Location: Perth, Oz
Post: #182
Hi I'm wondering if anyone can help.

I'm getting python script errors with this plugin when running on Crystalbuntu. It appears to be using Python 2.6.

14:47:05 T:2722581392 INFO: -->Python script returned the following error<--
14:47:05 T:2722581392 ERROR: Error Type: <type 'exceptions.ImportError'>
14:47:05 T:2722581392 ERROR: Error Contents: No module named PIL
14:47:05 T:2722581392 ERROR: Traceback (most recent call last):
File "/root/.xbmc/addons/weather.ozweather/default.py", line 24, in <module>
from PIL import Image
ImportError: No module named PIL
14:47:05 T:2722581392 INFO: -->End of Python script error report<--


line 23/24 of default.py:

import time
from PIL import Image
find quote
bossanova808 Offline
Donor
Posts: 2,297
Joined: Sep 2009
Reputation: 36
Location: Melbourne, Australia
Post: #183
You'll need to ask the Crystalbuntu developer to add the PIL - python image library. It's essential if you want the advanced features (ie radar). I could stop the import of the PIL library if these are switched off I guess, but really PIL is supposed to come with XBMC....I'm sure he'd be willing to add it.

http://www.stmlabs.com/contact/

My XBMC stuff:
find quote
wrxtasy Offline
Senior Member
Posts: 228
Joined: Feb 2012
Reputation: 3
Location: Perth, Oz
Post: #184
Thanks. Time to contact Sam then.

For the time being I have removed the line:
from PIL import Image

from the default.py script and the plugin works, except the Radar Background Image does not appear.

BTW Cracker of a Thunderstorm overhead here in Perth at the moment. :-)
(This post was last modified: 2012-05-31 10:20 by wrxtasy.)
find quote
bossanova808 Offline
Donor
Posts: 2,297
Joined: Sep 2009
Reputation: 36
Location: Melbourne, Australia
Post: #185
I am about to commit and then request a pull of a new version...once they look at it it will make its way out to the wide world...

V0.3.8
- Only import PIL if extended features are activated (means on platforms like Crystalbuntu without PIL you can still get BOM weather data at least without having to edit any code)
- some radars (e.g. IDR072) - were not on the ftp server, they now get pulled in by http if they're available that way (thanks youngman!)
- backgrounds are refreshed every 24 hours to pick up any changes at the BOM

My XBMC stuff:
find quote
wrxtasy Offline
Senior Member
Posts: 228
Joined: Feb 2012
Reputation: 3
Location: Perth, Oz
Post: #186
(2012-05-31 09:43)bossanova808 Wrote:  You'll need to ask the Crystalbuntu developer to add the PIL - python image library. It's essential if you want the advanced features (ie radar). I could stop the import of the PIL library if these are switched off I guess, but really PIL is supposed to come with XBMC....I'm sure he'd be willing to add it.

http://www.stmlabs.com/contact/

To help fellow Perth users [IDR703] that may happen to be running Crystalbuntu and have no PIL library, nor have the correct links in the OzWeather default.py script to the 128Km Perth Radar backgrounds. I have converted the idx files to RGB ones that now display properly inside the Plugin.

Download here:

http://dl.dropbox.com/u/27641650/background.png
http://dl.dropbox.com/u/27641650/catchments.png
http://dl.dropbox.com/u/27641650/legend.png
http://dl.dropbox.com/u/27641650/locations.png
http://dl.dropbox.com/u/27641650/range.png
http://dl.dropbox.com/u/27641650/topography.png

These need to be put in these appropriate directory(s):

ATV1 running Crystalbuntu
/root/.xbmc/userdata/addon_data/weather.ozweather/radarbackgrounds/IDR703/

ATV2
/User/Library/Preferences/XBMC/userdata/addon_data/weather.ozweather/radarbackgrounds/IDR703/

Wink
(This post was last modified: 2012-05-31 16:44 by wrxtasy.)
find quote
bossanova808 Offline
Donor
Posts: 2,297
Joined: Sep 2009
Reputation: 36
Location: Melbourne, Australia
Post: #187
That's very good work


That said once my update flows through I don't think this will be necessary....as long as those other radars live on the end of that http link we should be right...

My XBMC stuff:
find quote
Hopelessone Offline
Senior Member
Posts: 100
Joined: Dec 2008
Reputation: 0
Post: #188
Hi,

Thanks for making a weather app in OZ!

I have the following error:
Quote:11:03:29 T:139938414716672 NOTICE: -->Python Interpreter Initialized<--
11:03:29 T:139938414716672 NOTICE: CommonFunctions-0.9.2
11:03:29 T:139938414716672 NOTICE: Oz Weather-0.3.7: Getting weather from , Extended features = false
11:03:29 T:139938414716672 ERROR: Error Type: <type 'exceptions.KeyError'>
11:03:29 T:139938414716672 ERROR: Error Contents: ('content',)
11:03:29 T:139938414716672 ERROR: Traceback (most recent call last):
File "/home/blade/.xbmc/addons/weather.ozweather/default.py", line 585, in <module>
forecast(location, radar)
File "/home/blade/.xbmc/addons/weather.ozweather/default.py", line 233, in forecast
propertiesPDOM(data["content"], extendedFeatures)
KeyError: ('content',)
11:03:36 T:139939974326144 NOTICE: Storing total System Uptime
11:03:36 T:139939974326144 NOTICE: Saving settings
11:03:36 T:139939974326144 NOTICE: stop all

Heres the log with debug enabled:
Quote:11:09:49 T:140285702567680 NOTICE: -->Python Interpreter Initialized<--
11:09:49 T:140285702567680 DEBUG: Process - The source file to load is /home/blade/.xbmc/addons/weather.ozweather/default.py
11:09:49 T:140285702567680 DEBUG: Process - Setting the Python path to /home/blade/.xbmc/addons/weather.ozweather:/home/blade/.xbmc/addons/script.module.simplejson/lib:/usr/share/xbmc/addons/script.module.pil/lib:/home/blade/.xbmc/addons/script.common.plugin.cache/lib:/home/blade/.xbmc/addons/script.module.parsedom/lib:/home/blade/.xbmc/addons/script.module.elementtree/lib:/usr/share/xbmc/addons/script.module.pysqlite/lib:/usr/lib/python2.7:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages/PIL:/usr/lib/python2.7/dist-packages/gst-0.10:/usr/lib/python2.7/dist-packages/gtk-2.0:/usr/lib/pymodules/python2.7:/usr/lib/python2.7/dist-packages/ubuntu-sso-client:/usr/lib/python2.7/dist-packages/ubuntuone-client:/usr/lib/python2.7/dist-packages/ubuntuone-control-panel:/usr/lib/python2.7/dist-packages/ubuntuone-couch:/usr/lib/python2.7/dist-packages/ubuntuone-installer:/usr/lib/python2.7/dist-packages/ubuntuone-storage-protocol:
11:09:49 T:140285702567680 DEBUG: Process - Entering source directory /home/blade/.xbmc/addons/weather.ozweather
11:09:49 T:140285702567680 DEBUG: Instantiating addon using automatically obtained id of "weather.ozweather" dependent on version 2.0 of the xbmc.python api
11:09:49 T:140286532552448 DEBUG: CPVRChannelGroup - Persist - persisting channel group 'SDTV' with 12 channels
11:09:49 T:140285702567680 NOTICE: CommonFunctions-0.9.2
11:09:49 T:140286532552448 DEBUG: CPVRChannelGroup - Persist - persisting channel group 'Seven Network' with 4 channels
11:09:49 T:140285702567680 NOTICE: Oz Weather-0.3.7: Getting weather from , Extended features = false
11:09:49 T:140285702567680 INFO: -->Python script returned the following error<--
11:09:49 T:140285702567680 ERROR: Error Type: <type 'exceptions.KeyError'>
11:09:49 T:140285702567680 ERROR: Error Contents: ('content',)
11:09:49 T:140285702567680 ERROR: Traceback (most recent call last):
File "/home/blade/.xbmc/addons/weather.ozweather/default.py", line 585, in <module>
forecast(location, radar)
File "/home/blade/.xbmc/addons/weather.ozweather/default.py", line 233, in forecast
propertiesPDOM(data["content"], extendedFeatures)
KeyError: ('content',)
11:09:49 T:140285702567680 INFO: -->End of Python script error report<--

XBMC (11.0 Git:4ed6a0c), Platform: Linux (Ubuntu 12.04 LTS, 3.2.0-24-generic x86_64). Built on Apr 19 2012, Sydney location 2095, with [IDR714]

What seems to be the problem?

Ubuntu 13.10 64bit
(This post was last modified: 2012-06-02 03:15 by Hopelessone.)
find quote
bossanova808 Offline
Donor
Posts: 2,297
Joined: Sep 2009
Reputation: 36
Location: Melbourne, Australia
Post: #189
At first glance looks like you didn't hit ok when doing your settings, just back. Thus it didn't save them and in the debug log you can see it doing a call with empty config data... Can you double check that?

My XBMC stuff:
find quote
bossanova808 Offline
Donor
Posts: 2,297
Joined: Sep 2009
Reputation: 36
Location: Melbourne, Australia
Post: #190
Ok finally got my pull request for 0.3.8 right (third time's a charm) - should be flowing through to you soon...

My XBMC stuff:
find quote
youngman Offline
Junior Member
Posts: 10
Joined: May 2012
Reputation: 0
Post: #191
(2012-05-31 14:35)bossanova808 Wrote:  - some radars (e.g. IDR072) - were not on the ftp server, they now get pulled in by http if they're available that way (thanks youngman!)
Works like a charm! Thanks mate!
find quote
bossanova808 Offline
Donor
Posts: 2,297
Joined: Sep 2009
Reputation: 36
Location: Melbourne, Australia
Post: #192
No probs - basically it jsut ties http if ftp fails, seems to mostly work.

I was going to get it to force open the settings panel if the settings aren't set and weather is called, but none of the other weather addons do that so I though maybe that was too much for a weather addon that is called every 30 mins or something, might be hard for newbies or something...

My XBMC stuff:
find quote
Hopelessone Offline
Senior Member
Posts: 100
Joined: Dec 2008
Reputation: 0
Post: #193
Works ok, now when using the remote instead of the keyboard. Thanks

Ubuntu 13.10 64bit
find quote
bossanova808 Offline
Donor
Posts: 2,297
Joined: Sep 2009
Reputation: 36
Location: Melbourne, Australia
Post: #194
You'd have to hit enter on the 'ok' button to get it to save your settings with the keyboard instad of the usual escape/backspace you might normally use to navigate backwards.

My XBMC stuff:
find quote
Hopelessone Offline
Senior Member
Posts: 100
Joined: Dec 2008
Reputation: 0
Post: #195
Hi,
How do you get the 7 day forecast? I cleared the temp dir..

Screenshot:
http://imageshack.us/photo/my-images/502...04140.png/

Ubuntu 13.10 64bit
find quote
Post Reply