Code: Alles auswählen
>>> import urllib2
>>> response = urllib2.urlopen("http://google.com")
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "Portable Python 2.7.2.1\App\lib\urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "Portable Python 2.7.2.1\App\lib\urllib2.py", line 394, in open
response = self._open(req, data)
File "Portable Python 2.7.2.1\App\lib\urllib2.py", line 412, in _open
'_open', req)
File "Portable Python 2.7.2.1\App\lib\urllib2.py", line 372, in _call_chain
result = func(*args)
File "Portable Python 2.7.2.1\App\lib\urllib2.py", line 1199, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "Portable Python 2.7.2.1\App\lib\urllib2.py", line 1174, in do_open
raise URLError(err)
URLError: <urlopen error [Errno 11004] getaddrinfo failed>