hitbtc icon indicating copy to clipboard operation
hitbtc copied to clipboard

Cannot Send payload - Connection not established!

Open kanni-grand opened this issue 6 years ago • 5 comments

I have a connection problem. I tried to use the code from the example but it says to me that. Cannot Send payload - Connection not established! But does not indicate an error. I tried to use an atorted connection. The result was the same. I tried to run from the development of the pyharm. What could be the problem?

kanni-grand avatar Feb 28 '19 14:02 kanni-grand

Yep I am having this issue too.

Just installed the module with pip and ran this as a test script and got the error which is coming from the Connector class

I added in my api keys to see if it was an authentication problem but this made no change to the response

MikeHibbert avatar Apr 10 '19 22:04 MikeHibbert

I'm not sure if this is relevant but I'm using Python 3.6 on this, pehaps thats part of the issue?

MikeHibbert avatar Apr 13 '19 13:04 MikeHibbert

The issue stems from breaking changes in websocket-client library. Version 0.49 in particular. The current workaround is to install version 0.48 of websocket using pip: pip install -Iv websocket-client==0.48

https://github.com/websocket-client/websocket-client/issues/471 https://github.com/websocket-client/websocket-client/blob/14f6c9326dc907bea3cfdcf3e45f620200a2ae16/ChangeLog

ivanzhelyazkov avatar Jan 24 '20 13:01 ivanzhelyazkov

Try to run the example: (downgraded websocket-client from 0.57 to 0.48) but no effect. I'm not authenticated because it's a public api ...

Cannot Send payload - Connection not established! Exception in thread Thread-4: Traceback (most recent call last): File "../lib/python3.8/threading.py", line 932, in _bootstrap_inner self.run() File "", line 117, in run File "", line 113, in _connect File ".../lib/python3.8/site-packages/websocket/_app.py", line 207, in run_forever raise WebSocketException("socket is already opened") websocket._exceptions.WebSocketException: socket is already opened

rmokros avatar Apr 18 '20 16:04 rmokros

Set a time.sleep(10) of at least 10 seconds after you open the websocket connection

StelicaRusu avatar Jun 24 '20 18:06 StelicaRusu