Hello, I am getting this error when trying to connect to Websocket Client. Can you please help with this ?
WS> User Agent: Python/3.6 websockets/4.0.1 cexio/1.0b
WS> CEXWebSocketClientProtocol with _config: {'ws': {'uri': 'wss://ws.cex.io/ws/'}, 'rest': {'uri': 'https://cex.io/api/'}, 'authorize': False, 'auth': '{***}'}
<asyncio.sslproto.SSLProtocol object at 0x1062235c0>: SSL handshake failed
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/sslproto.py", line 578, in _on_handshake_complete
raise handshake_exc
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/sslproto.py", line 201, in feed_ssldata
self._sslobj.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 683, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)
<asyncio.sslproto.SSLProtocol object at 0x1062235c0>: SSL error 1 (reason CERTIFICATE_VERIFY_FAILED)
SSLError ('[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)') while connecting
Traceback (most recent call last):
File "test_cex.py", line 147, in <module>
loop.run_until_complete(client.run())
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 466, in run_until_complete
return future.result()
File "/Users/mayank/cryptocurrencies/cexio/ws_client.py", line 192, in run
await self.connect()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/coroutines.py", line 109, in __next__
return self.gen.send(None)
File "/Users/mayank/cryptocurrencies/cexio/ws_client.py", line 186, in connect
raise ex
File "/Users/mayank/cryptocurrencies/cexio/ws_client.py", line 161, in connect
self.ws = await wait_for(websockets.connect(self._uri), self._timeout)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/tasks.py", line 352, in wait_for
return fut.result()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/tasks.py", line 530, in _wrap_awaitable
return (yield from awaitable.__await__())
File "/Users/mayank/pycrypto/lib/python3.6/site-packages/websockets-4.0.1-py3.6-macosx-10.6-intel.egg/websockets/client.py", line 393, in __await__
transport, protocol = yield from self._creating_connection
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 802, in create_connection
sock, protocol_factory, ssl, server_hostname)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 828, in _create_connection_transport
yield from waiter
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/sslproto.py", line 503, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/sslproto.py", line 201, in feed_ssldata
self._sslobj.do_handshake()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ssl.py", line 683, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)
Hello, I am getting this error when trying to connect to Websocket Client. Can you please help with this ?