(2014-10-19, 16:49)elviejo Wrote: [ -> ]Works perfectly, my only question is the 500 hits to get the key, how that works?
You are limited to 500 weather updates per day. I think the addon updates every 10 minutes so you'll be well under 500. Can I ask, did you have to install a new version of the addon to get this to work?
I downloaded the zip file in the database of XBMC and follow the instructions in this post.
Indeed. I got V4.01 my first download.
I tried again and got V4.03.
That's the latest version with Personal API input.
Thanks.
(2014-10-19, 03:09)wgstarks Wrote: [ -> ]I couldn't get this to work. Got the api no problem. Reversed it. Encoded to base64 (utf-8). Added that to wunderground.py. All I get is a constant Fetching forecast info.
Debug Log
Honestly I had the same problem. I had transcribed the base 64 encoded API incorrectly. If you aren't doing a copy paste, make sure you copy exactly including the double equal sign at the end. Mine had a combination of upper and lower case letters and numbers followed by the double equal signs. I did mix up the letter O and a 0 as well as a 2 and a Z. once I realized that it worked perfectly.
Ross
Thanks. Actually it has started working now. I watched a movie last night and noticed that current temp was being displayed so I checked the weather and everything had started working sometime in the past 48 hours. I don't really have a clue why. I had completely given up on the fix and figured I would investigate some new addons this week. Maybe weather underground takes a while to activate new api's.
Just a guess.
Edit: Is there any file I can edit to get the addon to not display as
BROKEN?
Yes, one weather underground update version, only need register in addon setting your API KEY.
I think the better way for you sane broken, is delete addonxx database file in userdata. When start Kodi will recreate, and it´s ok for use again.
(2014-10-20, 21:09)Wanilton Wrote: [ -> ]Yes, one weather underground update version, only need register in addon setting your API KEY.
I think the better way for you sane broken, is delete addonxx database file in userdata. When start Kodi will recreate, and it´s ok for use again.
That didn't work. When I restarted Kodi I just got a popup that the weather underground add-on was marked as broken and would I like to disable.
Edit: If someone could just post a link to the new add-on I could just download and install it.
Quick and dirty, you can do this:
Edit the wunderground.py file and replace these two lines. Still need an API key.
Line 6: WAIK = '[PASTE YOUR API KEY HERE]'
and
Line 10: url = WUNDERGROUND_URL % (WAIK, features, settings, query, fmt)
Removed the base64 Decode and Invert. I think you'll still get nagged that the add-on is broken when/if it checks.
Thanks, this worked for me.
(2014-10-21, 03:12)Kirky99 Wrote: [ -> ]Quick and dirty, you can do this:
Edit the wunderground.py file and replace these two lines. Still need an API key.
Line 6: WAIK = '[PASTE YOUR API KEY HERE]'
and
Line 10: url = WUNDERGROUND_URL % (WAIK, features, settings, query, fmt)
Removed the base64 Decode and Invert. I think you'll still get nagged that the add-on is broken when/if it checks.
I get a Error: Script Failed
Code:
# -*- coding: utf-8 -*-
import urllib2, gzip, base64
from StringIO import StringIO
WAIK = 'api edited'
WUNDERGROUND_URL = 'http://api.wunderground.com/api/%s/%s/%s/q/%s.%s'
def wundergroundapi(features, settings, query, fmt):
url = WUNDERGROUND_URL % (WAIK), features, settings, query, fmt)
try:
req = urllib2.Request(url)
req.add_header('Accept-encoding', 'gzip')
response = urllib2.urlopen(req)
if response.info().get('Content-Encoding') == 'gzip':
buf = StringIO(response.read())
compr = gzip.GzipFile(fileobj=buf)
data = compr.read()
else:
data = response.read()
response.close()
except:
data = ''
return data
@
wgstarks, what does the log say when you get the script error?
(2014-10-21, 04:57)teeedubb Wrote: [ -> ]@wgstarks, what does the log say when you get the script error?
This is the only thing I see in a rather quick search-
Code:
22:07:52 T:4534136832 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.SyntaxError'>
Error Contents: ('invalid syntax', ('/Users/wgstarks/Library/Application Support/XBMC/addons/weather.wunderground/resources/lib/wunderground.py', 10, 68, ' url = WUNDERGROUND_URL % (WAIK), features, settings, query, fmt)\n'))
Traceback (most recent call last):
File "/Users/wgstarks/Library/Application Support/XBMC/addons/weather.wunderground/default.py", line 39, in <module>
from wunderground import wundergroundapi
SyntaxError: ('invalid syntax', ('/Users/wgstarks/Library/Application Support/XBMC/addons/weather.wunderground/resources/lib/wunderground.py', 10, 68, ' url = WUNDERGROUND_URL % (WAIK), features, settings, query, fmt)\n'))
-->End of Python script error report<--
Looks like your edits from above are causing the errors.