0

I have these lines of code

url = "http://api.openweathermap.org/data/2.5/weather?q=Detroit,%20Us";
json_obj = urllib2.urlopen(url);
data = json.load(json_obj);

print data;

This works on my computer at home, but when I try it on my school computer, it gives me the error:

urllib2.URLError: <urlopen error [Errno 11003] getaddrinfo failed> 

I have no clue why this happens. My computer at home runs version 2.7.6 and at school we have 2.7.3.1, idk if this helps.

fredtantini
  • 15,966
  • 8
  • 49
  • 55
John K
  • 55
  • 7

0 Answers0