2016-04-11 18 views
5

Ich versuche, eine SSL-Verbindung zu AWS von Boto in Python (2.7.8) zu machen. Intern verwendet es Gevent-Funktion. Ich bekomme Fehler wie folgt-AttributError: 'Modul' Objekt hat kein Attribut 'sslwrap'

` File "/usr/lib/python2.7/site-packages/boto/sts/connection.py", line 384, in assume_role 

    return self.get_object("AssumeRole", params, AssumedRole, verb="POST") 

    File "/usr/lib/python2.7/site-packages/boto/connection.py", line 1192, in get_object 

    response = self.make_request(action, params, path, verb) 

    File "/usr/lib/python2.7/site-packages/boto/connection.py", line 1116, in make_request 

    return self._mexe(http_request) 
    File "/usr/lib/python2.7/site-packages/boto/connection.py", line 943, in _mexe 
    request.body, request.headers) 

    File "/usr/lib64/python2.7/httplib.py", line 995, in request 
    self._send_request(method, url, body, headers) 

    File "/usr/lib64/python2.7/httplib.py", line 1029, in _send_request 
    self.endheaders(body) 

    File "/usr/lib64/python2.7/httplib.py", line 991, in endheaders 
    self._send_output(message_body) 

    File "/usr/lib64/python2.7/httplib.py", line 844, in _send_output 
    self.send(msg) 

    File "/usr/lib64/python2.7/httplib.py", line 806, in send 
    self.connect() 

    File "/usr/lib/python2.7/site-packages/boto/https_connection.py", line 131, in connect 
    ca_certs=self.ca_certs) 

    File "/usr/lib64/python2.7/site-packages/gevent/ssl.py", line 383, in wrap_socket 
    ciphers=ciphers) 

    File "/usr/lib64/python2.7/site-packages/gevent/ssl.py", line 85, in __init__ 
    self._sslobj = _ssl.sslwrap(self._sock, server_side, 

    AttributeError: "module" object has no attribute "sslwrap" 

ich bin mit amazon linux-Rechner (AWS)

Vielen Dank im Voraus.

+0

Sie haben möglicherweise ein 'some_module als _ssl' importiert? – th3an0maly

+0

speichern Sie sich, verwenden Sie Boto3. – mootmoot

Antwort

0

Ich hatte das gleiche Problem, wenn Pip aus Python 2.7.12 (die Verwendung von derzeit im offiziellen Ubuntu 14.04 ppa).

Aktualisierung auf Python 2.7.13 (https://www.python.org/ftp/python/2.7.13/) löste das Problem für mich.

Verwandte Themen