在pyopenssl /ssl.py (20.0.1)中使用websocket create_connection() api调用创建安全websocket连接(Wss)时,将引发AttributeError: enter错误。
错误指向“在SSL.py文件的发送方法中可用的语句”,而在19.1.0pyopenssl版本中,没有观察到错误。
with _from_buffer(buf) as data:
# check len(buf) instead of len(data) for testability
if len(buf) > 2147483647:
raise ValueError(
"Cannot send more than 2**31-1 bytes at once."
)
result = _lib.SSL_write(self._ssl, data, len(data))
self._raise_ssl_error(self._ssl, result)
return result发布于 2021-04-26 03:46:24
试试pip install pyOpenSSL==19.1.0
https://stackoverflow.com/questions/65702981
复制相似问题