ssl handshake operation timed out on Python 3.3.2

Benedict Verheyen benedict.verheyen at gmail.com
Mon Jul 8 08:46:42 EDT 2013


Hi,


for a project, I need to post data to some aspx pages.
The aspx pages are hosted by another company.
I develop on a virtual Debian Wheezy (Virtual box) running on Windows.
I couldn't get the code to run either on Windows nor Linux.

On my testserver (also a Debian Linux Wheezy) however, the code works with 
Python 2.7.3 but not with Python 3.3.2. Another difference is that the 
testserver has a direct ip, so nothing in between the machine and the 
internet. I checked the firewall, the traffic passes without a problem.

The error I get is that the SSL handshake operation timed out.
I tried some code that specifies the ssl protocol but the results are the 
same.

I'm stumped. Does anyone have an idea as to why this code works on python 
2.7 and not on python 3.3?
To summarize, on my dev machine, it doesn't work with either Python 2.7.3 
or 3.3.2, on my test machine, it works with Python 2.7.3 but not with 
Python 3.3.2

An excerpt of the code:
...
data = {'_UserName_': username, '_Password_': password}
headers = {'Cache-control': 'private','Connection':'Keep-Alive'}
r = requests.post("https://url.aspx", data=data, headers=headers, 
timeout=8)


Any ideas would be welcome,

Cheers,
Benedict

-- 
Benedict Verheyen                       Debian, Python and Django user
GnuPG Public Key 0x712CBB8D




More information about the Python-list mailing list