You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2016-09-08.22:46:01.402>created_at=<Date2013-09-20.10:55:37.819>labels= ['invalid', 'type-bug', 'library']
title='Sometimes urllib2 raises URLError when trying POST with httpS'updated_at=<Date2016-09-08.22:46:01.400>user='https://bugs.python.org/mrDoctorWho0'
Trying to use POST-request to https://vk.com and sometimes library raise an error.
File "library/vkApi.py", line 31, in post
response = self.Opener.open(request)
File "/usr/lib/python2.7/urllib2.py", line 404, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 422, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1222, in https_open
return self.do_open(httplib.HTTPSConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
raise URLError(err)
URLError: <urlopen error _ssl.c:489: The handshake operation timed out>
This exception appears randomly, connection is ok 100%. I tried it on different machines with python 2.7.4 and 2.7.3.
I would guess that if you did a network trace you'd find out there really was a packet that did not arrive (a timeout). Note that detecting this is complicated by the fact that ssl is involved. (I don't know the details, but I remember someone saying that more than one packet may be involved in something that looks like a single event at the OpenSSL level.)
It is certainly *possible* that there is a bug at the OpenSSL or (less likely) the _ssl module level, but the first step in debugging it would be to get that network trace, I think...
As I said, though, I'm not an expert in this area, perhaps someone who is will have other suggestions.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: