作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在尝试通过在 python(2.7.8) 中使用 boto 与 aws 建立 ssl 连接。内部它使用的是 gevent 函数。我收到这样的错误-
` 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"
我正在使用亚马逊 Linux 机器 (AWS)
提前致谢。
最佳答案
我相信这可能与 https://github.com/gevent/gevent/issues/477 有关
将 gevent 从 1.0.1
升级到 1.1.1
为我解决了这个问题:
$ pip install --upgrade gevent
关于python - 属性错误 : 'module' object has no attribute 'sslwrap' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36554257/
_ssl.sslwrap 函数似乎检查传入的 sock 是否是 _socket.socket 的子类。我正在传递一个实现 _socket.socket 接口(interface)的类。 它很生气,因为
我正在尝试通过在 python(2.7.8) 中使用 boto 与 aws 建立 ssl 连接。内部它使用的是 gevent 函数。我收到这样的错误- ` File "/usr/lib/python2
我是一名优秀的程序员,十分优秀!