Code Monkey home page Code Monkey logo

Comments (27)

g0tzz avatar g0tzz commented on June 15, 2024 1

It seems that this made it work again:

(1) I created two new user environment variables:

  1. SSL_CERT_DIR with path to C:\Program Files (x86)\Common Files\SSL\certs
  2. SSL_CERT_FILE C:\Program Files (x86)\Common Files\SSL/cert.pem

(2) Created SSL directory in C:\Program Files (x86)\Common Files
(3) Created certs directory in C:\Program Files (x86)\Common Files\SSL
(4) installed certifi with pip install certifi
(5) Found the pem file from certifi:

import certifi
certifi.where()
'C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\site-packages\certifi\cacert.pem'

(6) Copied the cacert.pem file to C:\Program Files (x86)\Common Files\SSL/ directory.
(7) Changed its name to cert.pem

I don't know much about certificates or SSL, but it seems that python somehow lost its information about certificates.

Now it works, cheers!

from python-bittrex-websocket.

slazarov avatar slazarov commented on June 15, 2024

Paste your modified code.

from python-bittrex-websocket.

davidfindlay avatar davidfindlay commented on June 15, 2024

`from bittrex_websocket.websocket_client import BittrexSocket
from time import sleep

def main():
class MySocket(BittrexSocket):

    def on_public(self, msg):
        name = msg['M']
        if name not in ticker_updates_container:
            ticker_updates_container[name] = msg
            print('Just received market update for {}.'.format(name))

# Create container
ticker_updates_container = {}
# Create the socket instance
ws = MySocket()
# Enable logging
ws.enable_log()
# Define tickers
tickers = ['BTC-ETH', 'BTC-NEO', 'BTC-ZEC', 'ETH-NEO', 'ETH-ZEC']
# Subscribe to ticker information
for ticker in tickers:
    sleep(0.01)
    ws.subscribe_to_exchange_deltas([ticker])

# Users can also subscribe without introducing delays during invoking but
# it is the recommended way when you are subscribing to a large list of tickers.
# ws.subscribe_to_exchange_deltas(tickers)

while len(ticker_updates_container) < len(tickers):
    sleep(1)
else:
    print('We have received updates for all tickers. Closing...')
    ws.disconnect()
    sleep(10)

if name == "main":
main()`

Current code I've got.

Output:

2018-08-06 10:59:04 - bittrex_websocket.websocket_client - INFO - Establishing connection to Bittrex through https://socket.bittrex.com/signalr.
2018-08-06 10:59:04 - bittrex_websocket.websocket_client - INFO - cfscrape detected, will try to bypass Cloudflare if enabled.
2018-08-06 10:59:08 - 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-08-06 10:59:14 - 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 180, in _handle_subscribe
    self.invokes.append({'invoke': event.invoke, 'ticker': event.payload[0][0]})
AttributeError: 'CloseEvent' object has no attribute 'invoke'

from python-bittrex-websocket.

slazarov avatar slazarov commented on June 15, 2024

Sorry for the late reply, what version are you using? Where did you pass the SSL params?

from python-bittrex-websocket.

davidfindlay avatar davidfindlay commented on June 15, 2024

I've just updated to 1.0.6.2 today from pip. I'm not currently passing any SSL params, so I've just copied the code from the first example here under quick start: https://github.com/slazarov/python-bittrex-websocket

2018-08-30 07:13:15 - bittrex_websocket.websocket_client - INFO - Establishing connection to Bittrex through https://socket.bittrex.com/signalr. 2018-08-30 07:13:15 - bittrex_websocket.websocket_client - INFO - cfscrape detected, will try to bypass Cloudflare if enabled. 2018-08-30 07:13:16 - 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.

from python-bittrex-websocket.

slazarov avatar slazarov commented on June 15, 2024

from python-bittrex-websocket.

davidfindlay avatar davidfindlay commented on June 15, 2024

Just looking to try to do that. Looking at trying to install the extra in case it wasn't there:

Requirement already satisfied: requests[security] in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (2.19.1) Requirement already satisfied: urllib3<1.24,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from requests[security]) (1.22) Requirement already satisfied: idna<2.8,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from requests[security]) (2.5) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from requests[security]) (3.0.4) Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from requests[security]) (2017.7.27.1) Requirement already satisfied: cryptography>=1.3.4; extra == "security" in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from requests[security]) (2.1.4) Requirement already satisfied: pyOpenSSL>=0.14; extra == "security" in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from requests[security]) (17.5.0) Requirement already satisfied: asn1crypto>=0.21.0 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from cryptography>=1.3.4; extra == "security"->requests[security]) (0.24.0) Requirement already satisfied: cffi>=1.7; platform_python_implementation != "PyPy" in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from cryptography>=1.3.4; extra == "security"->requests[security]) (1.11.2) Requirement already satisfied: six>=1.4.1 in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from cryptography>=1.3.4; extra == "security"->requests[security]) (1.11.0) Requirement already satisfied: pycparser in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography>=1.3.4; extra == "security"->requests[security]) (2.18) polyaxon 0.0.33 has requirement numpy==1.13.1, but you'll have numpy 1.14.5 which is incompatible. polyaxon-schemas 0.0.15 has requirement numpy==1.13.1, but you'll have numpy 1.14.5 which is incompatible. nbconvert 5.3.1 has requirement nbformat>=4.4, but you'll have nbformat 4.3.0 which is incompatible. kubernetes 3.0.0 has requirement websocket-client<=0.40.0,>=0.32.0, but you'll have websocket-client 0.48.0 which is incompatible. bittrex-websocket 1.0.6.2 has requirement requests[security]==2.18.4, but you'll have requests 2.19.1 which is incompatible.

from python-bittrex-websocket.

davidfindlay avatar davidfindlay commented on June 15, 2024

Just set up a clean new install in a fresh venv, same issue:

(venv) Davids-MacBook-Pro:accounting david$ python market_monitor.py 
2018-08-30 17:25:50 - bittrex_websocket.websocket_client - INFO - Establishing connection to Bittrex through https://socket.bittrex.com/signalr.
2018-08-30 17:25:51 - 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.

I installed requests and requests[security]. Thanks,

David

from python-bittrex-websocket.

slazarov avatar slazarov commented on June 15, 2024

Hey David, let's do the following so at least we could replicate each other:
Note: I am using python3.7 in this case.

mkdir ~/test
cd ~/test
virtualenv venv/.
source venv/bin/activate
curl https://raw.githubusercontent.com/slazarov/python-bittrex-websocket/master/examples/ticker_updates.py -o ticker_updates.py
python ticker_updates.py

I get the following output, what do you get?

(venv) bash-3.2$ python ticker_updates.py
2018-08-30 12:30:21 - bittrex_websocket.websocket_client - INFO - Establishing connection to Bittrex through https://socket.bittrex.com/signalr.
2018-08-30 12:30:23 - bittrex_websocket.websocket_client - INFO - Successfully subscribed to [SubscribeToExchangeDeltas] for [BTC-ETH].
2018-08-30 12:30:23 - bittrex_websocket.websocket_client - INFO - Successfully subscribed to [SubscribeToExchangeDeltas] for [BTC-NEO].
2018-08-30 12:30:23 - bittrex_websocket.websocket_client - INFO - Successfully subscribed to [SubscribeToExchangeDeltas] for [BTC-ZEC].
2018-08-30 12:30:23 - bittrex_websocket.websocket_client - INFO - Successfully subscribed to [SubscribeToExchangeDeltas] for [ETH-NEO].
2018-08-30 12:30:23 - bittrex_websocket.websocket_client - INFO - Successfully subscribed to [SubscribeToExchangeDeltas] for [ETH-ZEC].
Just received market update for BTC-NEO.
Just received market update for ETH-ZEC.
Just received market update for BTC-ZEC.
Just received market update for BTC-ETH.
Just received market update for ETH-NEO.
We have received updates for all tickers. Closing...
2018-08-30 12:30:25 - bittrex_websocket.websocket_client - INFO - Bittrex connection successfully closed.

from python-bittrex-websocket.

davidfindlay avatar davidfindlay commented on June 15, 2024

That worked. The one thing I had to do that wasn't in your instructions was pip install bittrex_websocket. After doing that, I got this:

(venv) Davids-MacBook-Pro:test david$ python ticker_updates.py
2018-08-30 19:38:14 - bittrex_websocket.websocket_client - INFO - Establishing connection to Bittrex through https://socket.bittrex.com/signalr.
2018-08-30 19:38:18 - bittrex_websocket.websocket_client - INFO - Successfully subscribed to [SubscribeToExchangeDeltas] for [BTC-ETH].
2018-08-30 19:38:18 - bittrex_websocket.websocket_client - INFO - Successfully subscribed to [SubscribeToExchangeDeltas] for [BTC-NEO].
2018-08-30 19:38:18 - bittrex_websocket.websocket_client - INFO - Successfully subscribed to [SubscribeToExchangeDeltas] for [BTC-ZEC].
2018-08-30 19:38:18 - bittrex_websocket.websocket_client - INFO - Successfully subscribed to [SubscribeToExchangeDeltas] for [ETH-NEO].
2018-08-30 19:38:18 - bittrex_websocket.websocket_client - INFO - Successfully subscribed to [SubscribeToExchangeDeltas] for [ETH-ZEC].
Just received market update for ETH-ZEC.
Just received market update for BTC-NEO.
Just received market update for BTC-ETH.
Just received market update for BTC-ZEC.
Just received market update for ETH-NEO.
We have received updates for all tickers. Closing...
2018-08-30 19:38:20 - bittrex_websocket.websocket_client - INFO - Bittrex connection successfully closed.

So definitely and issue with my environment, including the new one i installed. Going to try an uninstall and reinstall. Thanks for your help.

from python-bittrex-websocket.

slazarov avatar slazarov commented on June 15, 2024

Glad that it's working. Upon solving your issue, please leave a note here for future reference.

With respect to installation, check this page:
https://python-bittrex-websocket-docs.readthedocs.io/en/latest/installation.html

Note: Usually the GitHub versions are slightly ahead in terms of commits than the PyPi versions..

from python-bittrex-websocket.

Crimees avatar Crimees commented on June 15, 2024

Hi there,

I don't have the same error, but I feel it's relevant to this topic

One thing to note - I am using commit
I followed your above instructions and ran python ticker_updates.py and got this

(venv) tapestry140:collina bogdan.culda$ venv/bin/python3 ticker_updates.py 
2018-08-30 17:01:49 - bittrex_websocket.websocket_client - INFO - Establishing connection to Bittrex through https://socket.bittrex.com/signalr.
2018-08-30 17:01:49 - bittrex_websocket.websocket_client - INFO - cfscrape detected, will try to bypass Cloudflare if enabled.
2018-08-30 17:01:50 - bittrex_websocket.websocket_client - ERROR - 
Unhandled Exception = <class 'gevent.hub.LoopExit'>, Message = <('This operation would block forever', <Hub at 0x105b54f20 select pending=0 ref=0>)>.
Auto-reconnection is disabled for unhandled exceptions.
Report to https://github.com/slazarov/python-bittrex-websocket.
2018-08-30 17:01:59 - bittrex_websocket.websocket_client - ERROR - Connection timeout after 10 seconds. Sending a reconnection signal.
Exception in thread ControlQueueThread:
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/bogdan.culda/Desktop/workspace/collina/venv/lib/python3.6/site-packages/bittrex_websocket/websocket_client.py", line 80, in control_queue_handler
    self._handle_subscribe(event)
  File "/Users/bogdan.culda/Desktop/workspace/collina/venv/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)})

Any thougths ? Thanks

from python-bittrex-websocket.

Crimees avatar Crimees commented on June 15, 2024

OK my mistake - I've recreated my environment from scratch and it's fixed now.

from python-bittrex-websocket.

davidfindlay avatar davidfindlay commented on June 15, 2024

I've not yet solved this, but I've noted something towards it. The virtualenv command seems to have set up a python 2.7 environment, and then doing pip install bittrex-websocket installed everything I needed. When I'm trying to do my actual development environment, I'm creating it with python3 -m venv venv. This creates a python 3.6 environment. In there if I run pip install bittrex-websocket, I get the issue I've had all along. So some dependancy that is needed to get this to work in python 3 seems to be missing. Not sure what it is yet though.

from python-bittrex-websocket.

Crimees avatar Crimees commented on June 15, 2024

Forgot to mention, I used python3 / pip3 to install everything as well.

from python-bittrex-websocket.

g0tzz avatar g0tzz commented on June 15, 2024

has anyone solved this? I'm getting the same error since yesterday... Didn't change anything.

SSL handshake failed on verifying the certificate
protocol: <asyncio.sslproto.SSLProtocol object at 0x14434D90>
transport: <_SelectorSocketTransport fd=1572 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\asyncio\sslproto.py", line 625, in _on_handshake_complete
raise handshake_exc
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\asyncio\sslproto.py", line 189, in feed_ssldata
self._sslobj.do_handshake()
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", line 763, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1051)
SSL error in data received

from python-bittrex-websocket.

slazarov avatar slazarov commented on June 15, 2024

Run it in a clear venv. You shouldn’t be getting asyncio errors, this library does not support asyncio.

from python-bittrex-websocket.

g0tzz avatar g0tzz commented on June 15, 2024

oh sry, I'm using bittrex-websocket-aio. Wrong thread ...

I tried running it in a clear env, I get the same thing. Literally didn't change or do anything in the past 2 days. Tried running it last night and got this. Also, reinstalled python to 3.7.2, same

Complete error:

SSL handshake failed on verifying the certificate
protocol: <asyncio.sslproto.SSLProtocol object at 0x12D09CF0>
transport: <_SelectorSocketTransport fd=1336 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\asyncio\sslproto.py", line 625, in _on_handshake_complete
raise handshake_exc
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\asyncio\sslproto.py", line 189, in feed_ssldata
self._sslobj.do_handshake()
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", line 763, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)
SSL error in data received
protocol: <asyncio.sslproto.SSLProtocol object at 0x12D09CF0>
transport: <_SelectorSocketTransport closing fd=1336 read=idle write=<idle, bufsize=0>>
Traceback (most recent call last):
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\asyncio\sslproto.py", line 526, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\asyncio\sslproto.py", line 189, in feed_ssldata
self._sslobj.do_handshake()
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", line 763, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)
Exception in thread SocketConnectionThread:
Traceback (most recent call last):
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 917, in _bootstrap_inner
self.run()
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\site-packages\bittrex_websocket\websocket_client.py", line 82, in _connection_handler
self.connection.conn.start()
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\site-packages\signalr_aio_connection.py", line 36, in start
self.__transport.start()
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\site-packages\signalr_aio\transports_transport.py", line 47, in start
self.ws_loop.run_until_complete(self.socket(self.ws_loop))
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\asyncio\base_events.py", line 584, in run_until_complete
return future.result()
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\site-packages\signalr_aio\transports_transport.py", line 59, in socket
loop=loop) as self.ws:
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\site-packages\websockets\py35\client.py", line 2, in aenter
return await self
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\site-packages\websockets\py35\client.py", line 12, in await_impl
transport, protocol = await self._creating_connection
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\asyncio\base_events.py", line 986, in create_connection
ssl_handshake_timeout=ssl_handshake_timeout)
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\asyncio\base_events.py", line 1014, in _create_connection_transport
await waiter
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\asyncio\sslproto.py", line 526, in data_received
ssldata, appdata = self._sslpipe.feed_ssldata(data)
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\asyncio\sslproto.py", line 189, in feed_ssldata
self._sslobj.do_handshake()
File "C:\Users\gos\AppData\Local\Programs\Python\Python37-32\lib\ssl.py", line 763, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)

from python-bittrex-websocket.

slazarov avatar slazarov commented on June 15, 2024

from python-bittrex-websocket.

g0tzz avatar g0tzz commented on June 15, 2024

I tried running it in a clear venv, same results. What could be the reason for sudden certificate error? I guess it is a local issue, but really don't know where to start searching. The command that lists the python certificates path gives this:

python -c "import ssl; print(ssl.get_default_verify_paths())"
DefaultVerifyPaths(cafile=None, capath=None, openssl_cafile_env='SSL_CERT_FILE', openssl_cafile='C:\Program Files (x86)\Common Files\SSL/cert.pem', openssl_capath_env='SSL_CERT_DIR', openssl_capath='C:\Program Files (x86)\Common Files\SSL/certs')

These directories don't exist.

from python-bittrex-websocket.

slazarov avatar slazarov commented on June 15, 2024

from python-bittrex-websocket.

mkang1234 avatar mkang1234 commented on June 15, 2024

I'm getting the same error message as well. I tried running the example ticker_updates.py and get the following error messages.

I also created a new venv, and did pip install bittrex_websocket. Still getting the same error message.

python ticker_updates.py
2019-01-21 20:12:49 - bittrex_websocket.websocket_client - INFO - Establishing connection to Bittrex through https://socket.bittrex.com/signalr.
2019-01-21 20:12:50 - bittrex_websocket.websocket_client - ERROR -
Unhandled Exception = <class 'ssl.SSLError'>, Message = <[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:748)>.
Auto-reconnection is disabled for unhandled exceptions.
Report to https://github.com/slazarov/python-bittrex-websocket.
2019-01-21 20:12:59 - bittrex_websocket.websocket_client - ERROR - Connection timeout after 10 seconds. Sending a reconnection signal.
Exception in thread ControlQueueThread:
Traceback (most recent call last):
File "C:\Users\michael.kang\AppData\Local\Programs\Python\Python36\lib\threading.py", line 916, in _bootstrap_inner
self.run()
File "C:\Users\michael.kang\AppData\Local\Programs\Python\Python36\lib\threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\michael.kang\AppData\Local\Programs\Python\Python36\lib\site-packages\bittrex_websocket\websocket_client.py", line 80, in control_queue_handler
self._handle_subscribe(event)
File "C:\Users\michael.kang\AppData\Local\Programs\Python\Python36\lib\site-packages\bittrex_websocket\websocket_client.py", line 184, in _handle_subscribe
self.invokes.append({'invoke': event.invoke, 'ticker': identify_payload(event.payload)})
AttributeError: 'CloseEvent' object has no attribute 'invoke'

from python-bittrex-websocket.

stanith1 avatar stanith1 commented on June 15, 2024

I've suddenly started getting this too, have had my program running 24/7 for months and months without issue until now. Very strange! Haven't changed my python env in any way recently either.

from python-bittrex-websocket.

stanith1 avatar stanith1 commented on June 15, 2024

I can confirm that the steps provided by @goshetovan appear to fix the problem for me. Perhaps it's an issue with the default SSL certificates, I recall seeing a similar issue in the CCXT library.

from python-bittrex-websocket.

mkang1234 avatar mkang1234 commented on June 15, 2024

I can confirm that the steps provided by @goshetovan appear to fix the problem for me. Perhaps it's an issue with the default SSL certificates, I recall seeing a similar issue in the CCXT library.

Thanks. I'll try those steps as well.

from python-bittrex-websocket.

slazarov avatar slazarov commented on June 15, 2024

I will look into this. Glad you found a workaround.

from python-bittrex-websocket.

littlekfc avatar littlekfc commented on June 15, 2024

@slazarov The SSL issue for python2.7 could be fixed by passing sslopt parameter with ssl.CERT_NONE.

    self.ws = create_connection(ws_url,
                             header=self.__get_headers(),
                             cookie=self.__get_cookie_str(),
                             sslopt={"cert_reqs": ssl.CERT_NONE},
                             enable_multithread=True) 

You can update your signalr library to solve the SSL issue. Just update file in signalr/transports/_ws_transport.py. btw, do not forget import ssl.

Thanks for your work for bittrex websocket!

from python-bittrex-websocket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.