Unable to reach Weather Underground. URLError - <urlopen err

Posted on
Sun Nov 27, 2016 12:07 pm
AndersKn offline
Posts: 9
Joined: Jan 12, 2014

Unable to reach Weather Underground. URLError - <urlopen err

Hi,

I get errors and no data seems to be loaded from Weather Underground.
Below I have gathered the Log produced in Indigo. I have also attached the settings I have.
I am using the free plan from Weather Underground. I have updated and are running Indigo 7.0.2.
Any comment of what I am doing incorrect would be appreciated.

When I try to refresh the data I get the following errors in the Indigo Log window:
Code: Select all
 WUnderground Error              Unable to reach Weather Underground. URLError - <urlopen error no host given> (Line 817)
 WUnderground Error              Sleeping until next scheduled poll.


Using the debug output from Underground I see that the following URL is used:
Code: Select all
http://api.wunderground.com/api/XXXXXXXXXX
813671da849e7e02/geolookup/alerts_v11/almanac_v11/astronomy_v11/conditions_v11/forecast_v11/forecast10day_v11/hourly_v11/lang:EN/history_v11_20161126/tide_v11/q/SFO.json
(I have replaced my private key with XXXX'es.)

Using the URL in a normal browser gives:
Code: Select all
{
  "response": {
  "version":"0.1",
  "termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
  "features": {
  }
      ,
   "error": {
      "type": "keynotfound"
      ,"description": "this key does not exist"
   }
   }
}
I am quite certain that I am using the correct key. ( I even re-generated the key and switched in the settings panel). This has also worked in the past.


Best regards
Anders
Attachments
DeviceSetting.png
Setting for the Device
DeviceSetting.png (101.14 KiB) Viewed 1298 times
PlugInSetting.png
Settings for Wunderground
PlugInSetting.png (281.47 KiB) Viewed 1298 times

Posted on
Sun Nov 27, 2016 12:55 pm
AndersKn offline
Posts: 9
Joined: Jan 12, 2014

Re: Unable to reach Weather Underground. URLError - <urlopen

Hi,

Playing around a bit in a web browser it seems that there is a "/" missing in the URL.

Using:
Code: Select all
http://api.wunderground.com/api/XXXXXXXXXX813671da849e7e02/geolookup/alerts_v11/almanac_v11/astronomy_v11/conditions_v11/forecast_v11/forecast10day_v11/hourly_v11/lang:EN/history_v11_20161126/tide_v11/q/SFO.json
Will give the strange output as seen in my previous post. (My key replaced with XXX'es)


If I a "/" is inserted in the URL:
Code: Select all
http://api.wunderground.com/api/XXXX/813671da849e7e02/geolookup/alerts_v11/almanac_v11/astronomy_v11/conditions_v11/forecast_v11/forecast10day_v11/hourly_v11/lang:EN/history_v11_20161126/tide_v11/q/SFO.json

I get a more complete result:
Code: Select all
{
  "response": {
  "version":"0.1",
  "termsofService":"http://www.wunderground.com/weather/api/d/terms.html",
  "features": {
  "geolookup": 1
  ,
  "alerts": 1
  ,
  "almanac": 1
  ,
  "astronomy": 1
  ,
  "conditions": 1
  ,
  "forecast": 1
  ,
  "forecast10day": 1
  ,
  "hourly": 1
  ,
  "history": 1
  ,
  "tide": 1
  }
      ,
   "error": {
      "type": "unknownfeature"
   }
   }
      ,   "location": {
      "type":"CITY",
      "country":"US",
      "country_iso3166":"US",
      "country_name":"USA",
      "state":"CA",
      "city":"San Francisco International",
      "tz_short":"PST",
      "tz_long":"America/Los_Angeles",
      "lat":"37.61888885",
      "lon":"-122.37472534",
      "zip":"94128",
(I have only posted first few lines of output).
Thus it would seem that something is not correct with the URL.

I tried to add a "/" in the setting, but this did not help.


Best regards
Anders

Posted on
Sun Nov 27, 2016 2:02 pm
DaveL17 offline
User avatar
Posts: 6741
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Unable to reach Weather Underground. URLError - <urlopen

Hi Anders - I'm not sure what's going on with your key. When I copy your original URL and insert my key in its place, the data downloads just fine (the original URL you posted is broken over two lines, which I corrected.)

This URL works for me:
Code: Select all
http://api.wunderground.com/api/XXXXXXXXXXX/geolookup/alerts_v11/almanac_v11/astronomy_v11/conditions_v11/forecast_v11/forecast10day_v11/hourly_v11/lang:EN/history_v11_20161126/tide_v11/q/SFO.json

I also tested the URL generated by the plugin and that works too.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest