do_handshake_on_connect should not be specified for non-blocking sockets

Etienne Robillard tkadm30 at yandex.com
Fri Feb 23 08:16:13 EST 2018


How can i fix this error?

I'm using gevent/uwsgi and python 2.7.13...

Looks like ssl.py really needs monkey-patching to work with 
gevent/uwsgi, but i'm not sure exactly where/what triggers this error.

Any thoughts?

Etienne


File "/home/www/isotoperesearch.ca/trunk/www-bin/dispatch-django.uwsgi", 
line 17, in application
     return wsgi_app(environ, start_response)
   File 
"/home/erob/src/django-hotsauce-oauthclient/lib/wsgi_oauth2/middleware.py", 
line 228, in __call__
     code)
   File 
"/home/erob/src/django-hotsauce-oauthclient/lib/wsgi_oauth2/client.py", 
line 114, in request_access_token
     data=urlencode(form).encode('utf-8'))
   File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen
     return opener.open(url, data, timeout)
   File "/usr/lib/python2.7/urllib2.py", line 429, in open
     response = self._open(req, data)
   File "/usr/lib/python2.7/urllib2.py", line 447, in _open
     '_open', req)
   File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
     result = func(*args)
   File "/usr/lib/python2.7/urllib2.py", line 1241, in https_open
     context=self._context)
   File "/usr/lib/python2.7/urllib2.py", line 1195, in do_open
     h.request(req.get_method(), req.get_selector(), req.data, headers)
   File "/usr/lib/python2.7/httplib.py", line 1042, in request
     self._send_request(method, url, body, headers)
   File "/usr/lib/python2.7/httplib.py", line 1082, in _send_request
     self.endheaders(body)
   File "/usr/lib/python2.7/httplib.py", line 1038, in endheaders
     self._send_output(message_body)
   File "/usr/lib/python2.7/httplib.py", line 882, in _send_output
     self.send(msg)
   File "/usr/lib/python2.7/httplib.py", line 844, in send
     self.connect()
   File "/usr/lib/python2.7/httplib.py", line 1263, in connect
     server_hostname=server_hostname)
   File "/usr/lib/python2.7/ssl.py", line 363, in wrap_socket
     _context=self)
   File "/usr/lib/python2.7/ssl.py", line 610, in __init__
     raise ValueError("do_handshake_on_connect should not be specified 
for non-blocking sockets")
ValueError: do_handshake_on_connect should not be specified for 
non-blocking sockets




More information about the Python-list mailing list