Kodi Community Forum
Broken OpenWeatherMap Extended - 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 OpenWeatherMap Extended (/showthread.php?tid=207110)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42


RE: OpenWeatherMap Extended - mickkael - 2015-06-08

Hi ronie,

I try to use the plugin without success

I use Kodi 14.2 on Raspbian, I cannot find the city with the search, so I inserted directly in settings.xml

Code:
<setting id="Location1" value="Singapore" />
    <setting id="Location1ID" value="1880252" />
    <setting id="Location1deg" value="[103.850067, 1.289670]" />

Log

Code:
09:51:44 T:1828713488   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.ValueError'>
                                            Error Contents: math domain error
                                            Traceback (most recent call last):
                                              File "/home/kodi/.kodi/addons/weather.openweathermap.extended/resources/lib/maps.py", line 217, in <module>
                                                Main()
                                              File "/home/kodi/.kodi/addons/weather.openweathermap.extended/resources/lib/maps.py", line 22, in __init__
                                                self._get_maps(lat, lon)
                                              File "/home/kodi/.kodi/addons/weather.openweathermap.extended/resources/lib/maps.py", line 54, in _get_maps
                                                x, y = GET_TILE(lat, lon, ZOOM)
                                              File "/home/kodi/.kodi/addons/weather.openweathermap.extended/resources/lib/utils.py", line 383, in GET_TILE
                                                ytile = int((1.0 - math.log(math.tan(lat_rad) + (1 / math.cos(lat_rad))) / math.pi) / 2.0 * n)
                                            ValueError: math domain error
                                            -->End of Python script error report<--

Can you help ?
thanks


RE: OpenWeatherMap Extended - ronie - 2015-06-08

Location1deg is the latitude/longitude value, so put them in the correct order:
Code:
<setting id="Location1deg" value="[1.289670, 103.850067]" />



RE: OpenWeatherMap Extended - mickkael - 2015-06-08

Works great now !
Thanks


RE: OpenWeatherMap Extended - bleakassassin - 2015-06-15

I have to say that I'm really happy to see a new weather add-on available! It's looking continuously more promising, too. Thank you for your work on it.

However...

... I have found that this add-on is causing Kodi to take a long time to exit. Regardless of which skin I'm using, having OpenWeatherMap installed causes exit times to at least double, oftentimes triple. I know it's this add-on because my debug log notes for it that the "script didn't stop in 5 seconds - let's kill it". The time between the script being called to stop and it actually stopping exceeds the stopping times for all other add-ons combined.

Any idea why this may be?


RE: OpenWeatherMap Extended - mgonzales - 2015-06-22

First thank you for all the hard work you have put into this since the tragic (yes I still mourn) loss of weather underground... Nod

have a couple request I would love to see and be very grateful for if just the consideration of you adding them in one form or another.

Request 1:

Any chance you could make the script more robust for map tile downloads?

Maybe allow a setting for timeout in seconds and/or retries?

could even implement it so the user could cache the map data, specify an age tolerance before a refresh of the map data was needed
.... so only failed downloads would retry if other map info was relatively up to date based on those settings?

reason for asking is because i've been seeing a lot of:

05:21:32 T:12448 DEBUG: weather.openweathermap.extended: image download failed

it's pretty obvious that the free API server is typically overloaded (some tweets from the past):

https://twitter.com/OpenWeatherMap/status/582691029414862848

https://twitter.com/OpenWeatherMap/status/576810347299930112

https://twitter.com/OpenWeatherMap/status/576810346159063040

even they suggest in one of many tweets related to overloaded servers: "Please implement fault tolerance strategies at your code side: an app made right is to consider a request can fail and have to be repeated."

if done in a friendly way to the API servers this could help lower the number of API calls made in vain due to incomplete / failed data being returned for the addon,

Request 2:

second request is to add a new map for current conditions... something like this:

Image

image is a screenshot of the http://openweathermap.org map

not sure if they actually provide this as a map via the API's or not because if you go to: http://openweathermap.org/hugemaps
and scroll down to Full list of weather maps (layers) it's not listed as one of the layers available.

if that is the case then this 2nd request is not likely to happen

Again thanks for the great work you and all the other team members are doing - much appreciated.

and finally thanks for your consideration of any of this Smile

Mario


RE: OpenWeatherMap Extended - ronie - 2015-06-22

thanx for the suggestions. it indeed makes sense to add some retry handling for failed downloads.
if you're interested, please give script.openweathermap.maps-0.0.3.zip a try.

as for the second request, i know as much as you do :-)
since there's no api docs for that particular map, i assume it's not possible.


Open weather not showing maps - pa2471 - 2015-06-23

Hi,

This is a great weather app. However none of themaps show up. Do i need to install something else to make that part work?

Im on kodi 14.2, and aftv with aeon nox skin.

Thanks


RE: OpenWeatherMap Extended - jp2code - 2015-06-23

Hi Ronie,

We've had the OpenWeather plugin installed for some time. We have also tried the Yahoo! Weather plugin.

Neither are able to display anything after being configured.

I see this thread is up to 261 posts. I read the first and second page, now the last page, but not all of the info in between (time to clock in soon).

Is there a post in this thread that addresses this issue?

These plugins all seemed to work back when we were using v12 (Gotham). Once the community started moving forward into Kodi, the plugins stopped working. I was hoping that by ditching XBMC and going to Kodi would fix this issue, but it as not.

Thanks for your work in this.


RE: OpenWeatherMap Extended - RavRob - 2015-06-23

@ronie
It is a very nice plugin, very well done. My problem is that I can not enter my location. It won't recognize it. I can enter a city close by but not my hometown. Not sure anything can be done about that and if it cannot be fixed no sweat. Just thought I'd bring this up.

Thanks


RE: OpenWeatherMap Extended - ronie - 2015-06-23

(2015-06-23, 14:48)jp2code Wrote: I see this thread is up to 261 posts. I read the first and second page, now the last page, but not all of the info in between (time to clock in soon).

as soon as you have a bit more time available, read the first post again.
it has all the info you in order to receive some help with your problem.


RE: OpenWeatherMap Extended - ronie - 2015-06-23

(2015-06-23, 16:13)RavRob Wrote: @ronie
It is a very nice plugin, very well done. My problem is that I can not enter my location. It won't recognize it. I can enter a city close by but not my hometown. Not sure anything can be done about that and if it cannot be fixed no sweat. Just thought I'd bring this up.

Thanks

the easiest way is to pick a city close to your town (i'm sure the weather won't differ that much),
next go to the addon settings, expert tab, and enter the name of your town there.
this will make Kodi display the name of your hometown on the weather page.


RE: OpenWeatherMap Extended - RavRob - 2015-06-23

(2015-06-23, 16:22)ronie Wrote:
(2015-06-23, 16:13)RavRob Wrote: @ronie
It is a very nice plugin, very well done. My problem is that I can not enter my location. It won't recognize it. I can enter a city close by but not my hometown. Not sure anything can be done about that and if it cannot be fixed no sweat. Just thought I'd bring this up.

Thanks

the easiest way is to pick a city close to your town (i'm sure the weather won't differ that much),
next go to the addon settings, expert tab, and enter the name of your town there.
this will make Kodi display the name of your hometown on the weather page.

Awesone. That will work fine for me. Thanks for the super fast response. It is great to have such support for addons. Tx m8


RE: OpenWeatherMap Extended - jp2code - 2015-06-23

(2015-06-23, 16:20)ronie Wrote:
(2015-06-23, 14:48)jp2code Wrote: I see this thread is up to 261 posts. I read the first and second page, now the last page, but not all of the info in between (time to clock in soon).

as soon as you have a bit more time available, read the first post again.
it has all the info you in order to receive some help with your problem.

Does that mean you would like to see a debug log file? There doesn't seem to be much info other than screenshots on Post 1.

Uploading a debug log here at work required me to install Kodi on my desktop PC. I did that, then had to get the weather add-on.

Also, there is no link on Post 1 to the actual add-on. I was going to show you what I see here at work. I downloaded Kodi, then had to do a separate search to find out how to install the OpenWeatherMap Extended add-on again.

I found this link: Add-on:OpenWeatherMap Extended.

For Installing, it shows to go into Settings > Add-ons, Get add-ons > Kodi add-on repository > Huh

As shown below, I don't have anything in the repository.

Image

Does anyone know if Kodi uses a link to read in information off the web or are these repository items installed when Kodi is installed? If it is a link to online content, that data could be blocked at work's proxy.


RE: Open weather not showing maps - kingsombra - 2015-06-26

(2015-06-23, 00:23)pa2471 Wrote: Hi,

This is a great weather app. However none of themaps show up. Do i need to install something else to make that part work?

Im on kodi 14.2, and aftv with aeon nox skin.

Thanks

Most think this is actually a packaging bug. I be willing to bet you are also seeing a little red script error pop up when you start KODI.

If you turn on debuging in the Expert Setting section then review the log, I bet you will find a section that says it cant find PIL.

The issue is OpenWeatherMap Extended requires a package called PIL which is the python image library. It seems to have been missing for a while in most Android KODI/SPMC packages, back to 14.2 and continuing into 15.1, and 15.2

I have been patiently waiting for this to get fixed. No one has fixed it yet. Angry

EDIT: Hu. I think I may have figured out a way to fix it (IF YOU HAPPEN TO HAVE ANOTHER INSTALL OF KODI ON A WINDOWS OR LINUX OR OTHER MACHINE)

If you do happen to have another installation of Kodi, the idea is to copy the "script.module.pil" package from that machine to your Android machine. (This will be a directory and the entire directory and all its contents can be copied.)

On a windows 7 machine, the PIL directory is here...
C:\Program Files\Kodi\addons\script.module.pil
It could be this instead if you are Win 7 64 bit
C:\Program Files (x86)\Kodi\addons\script.module.pil

The easiest way to do this would probably be to copy this directory and its contents to a USB thumb drive, then connect it up to your Android device and copy the directory to your KODI data directory. Since I use SPMC that would be here...

/sdcard/Android/data/com.semperpax.spmc/files/.spmc/addons/script.module.pil

I am not exactly sure what the com directory for KODI would be but it should be close to the above.

This seems to have fixed the missing PIL errors for me. (Now I have to try this on my other TV box. Tongue )

EDIT2: I might have posted too soon. A windows version of PIL probably is not compatible with Android. It fixed the annoying error but it never brings up the maps themselves. Just the keybar at the bottom. So I am back to waiting for someone to fix this truely annoying PIL problem.


RE: Open weather not showing maps - ronie - 2015-06-26

(2015-06-23, 00:23)pa2471 Wrote: Hi,

This is a great weather app. However none of themaps show up. Do i need to install something else to make that part work?

Im on kodi 14.2, and aftv with aeon nox skin.

Thanks

the website providing the maps often times out, this could be the cause for not getting any images.
the latest version of the weather addon (for kodi 15.0 isengard only!) should work a lot better in this regard,
as it will retry to download the images over and over again 'till it succeeds.