urllib2 times out accessing SSL URL on OS X

Martin Aspeli optilude at gmail.com
Wed Apr 21 01:22:02 EDT 2010


Hi,

I am trying to connect to an HTTPS URL using urllib2.urlopen() (in
fact, the Suds SOAP client, which internally uses urlopen) on Mac OS X
Snow Leopard, with Python 2.6 built from source.

The website has a certificate (for *.domain.com), issued by Go Daddy
Secure Certification Authority. It is definitely valid.

I can open the web page in Firefox and Safari (but not in Chrome,
interestingly). However, urllib2 just times out trying to access it,
with not obvious error message (I get URLError: <urlopen error The
read operation timed out>)

On SuSE linux (our server), it works just fine. I didn't have to do
any fiddling at the OS level.

I've exported the certificate from Firefox and tried to add it to the
System keychain in Keychain Access in OS X, and set it as trusted, but
nothing seems to work.

Any hints would be appreciated!

Martin



More information about the Python-list mailing list