By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,767 Members | 1,310 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,767 IT Pros & Developers. It's quick & easy.

urllib2 on Windows Vista

P: n/a
I'm running Python 2.4.3 on Windows Vista June CTP. I'm not able to
open any site using the urllib2 and related family of modules

Here's what I get
>>import urllib2
urllib2.urlopen("http://www.microsoft.com")
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "D:\python24\lib\urllib2.py", line 130, in urlopen
return _opener.open(url, data)
File "D:\python24\lib\urllib2.py", line 358, in open
response = self._open(req, data)
File "D:\python24\lib\urllib2.py", line 376, in _open
'_open', req)
File "D:\python24\lib\urllib2.py", line 337, in _call_chain
result = func(*args)
File "D:\python24\lib\urllib2.py", line 1021, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "D:\python24\lib\urllib2.py", line 996, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error (11001, 'getaddrinfo failed')>

Is this a known issue on Windows Vista?

Thanks,
Sriram

Jul 8 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a

Sriram Krishnan wrote:
I'm running Python 2.4.3 on Windows Vista June CTP. I'm not able to
open any site using the urllib2 and related family of modules
My wil guess is that it is a firewall problem. Perhaps you'll have to
specify that python.exe is trusted.

Jul 8 '06 #2

P: n/a

Rune Strand wrote:
My wil guess is that it is a firewall problem. Perhaps you'll have to
specify that python.exe is trusted.
Tried that - it didn't work. I also tried turning off the User Account
Control and ran as full administrator - that didn't work too.

Jul 9 '06 #3

P: n/a
Sriram Krishnan wrote:
I'm running Python 2.4.3 on Windows Vista June CTP. I'm not able to
open any site using the urllib2 and related family of modules
I think you need to break the error further down. Try httplib instead
of urllib, and see what connect does. Then break this down into socket
calls (reading the source of httplib.connect, and executing it manually
in single-stepping), so that you know what the precise arguments passed
to getaddrinfo are.

FWIW, 11001 is WSAHOST_NOT_FOUND, which suggests that you have
DNS configured incorrectly.

Regards,
Martin
Jul 11 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.