Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

SSL: CERTIFICATE_VERIFY_FAILED #79

@photogadam

Description

@photogadam

I've tried the examples in the how to along with ticker.updates.py and the only response I'm receiving is ssl.SSLError. Any suggestions? Thanks in advance.

2018-10-15 20:34:12 - bittrex_websocket.websocket_client - INFO - Establishing connection to Bittrex through https://socket.bittrex.com/signalr.
2018-10-15 20:34:12 - bittrex_websocket.websocket_client - INFO - Successfully subscribed to [SubscribeToExchangeDeltas] for [BTC-ETH].
2018-10-15 20:34:12 - bittrex_websocket.websocket_client - INFO - Successfully subscribed to [SubscribeToExchangeDeltas] for [BTC-NEO].
2018-10-15 20:34:12 - bittrex_websocket.websocket_client - INFO - Successfully subscribed to [SubscribeToExchangeDeltas] for [BTC-ZEC].
2018-10-15 20:34:12 - bittrex_websocket.websocket_client - INFO - Successfully subscribed to [SubscribeToExchangeDeltas] for [ETH-NEO].
2018-10-15 20:34:12 - bittrex_websocket.websocket_client - INFO - Successfully subscribed to [SubscribeToExchangeDeltas] for [ETH-ZEC].
Exception in thread SocketConnectionThread:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/user/Desktop/aio/bittrex_websocket/websocket_client.py", line 82, in _connection_handler
    self.connection.conn.start()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/signalr_aio/_connection.py", line 36, in start
    self.__transport.start()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/signalr_aio/transports/_transport.py", line 47, in start
    self.ws_loop.run_until_complete(self.socket(self.ws_loop))
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 467, in run_until_complete
    return future.result()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/signalr_aio/transports/_transport.py", line 59, in socket
    loop=loop) as self.ws:
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/websockets/py35/client.py", line 2, in __aenter__
    return await self
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/websockets/py35/client.py", line 12, in __await_impl__
    transport, protocol = await self._creating_connection
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 803, 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 829, in _create_connection_transport
    yield from waiter
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/sslproto.py", line 501, 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 689, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)

^Z
[1]+  Stopped                 python3 test.py
Userss-MBP:aio user$ cd examples
Users-MBP:examples user$ python3 ticker_updates.py
2018-10-15 20:34:58 - bittrex_websocket.websocket_client - INFO - Establishing connection to Bittrex through https://socket.bittrex.com/signalr.
2018-10-15 20:34:59 - bittrex_websocket.websocket_client - ERROR - 
Unhandled Exception = <class 'ssl.SSLError'>, Message = <[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)>.
Auto-reconnection is disabled for unhandled exceptions.
Report to https://github.com/slazarov/python-bittrex-websocket.
2018-10-15 20:35:08 - bittrex_websocket.websocket_client - ERROR - Connection timeout after 10 seconds. Sending a reconnection signal.
Exception in thread ControlQueueThread:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/bittrex_websocket/websocket_client.py", line 80, in control_queue_handler
    self._handle_subscribe(event)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/bittrex_websocket/websocket_client.py", line 182, in _handle_subscribe
    self.invokes.append({'invoke': event.invoke, 'ticker': identify_payload(event.payload)})
AttributeError: 'CloseEvent' object has no attribute 'invoke'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions