Skip to content
This repository has been archived by the owner on Jul 20, 2020. It is now read-only.

Cannot Send payload - Connection not established! #32

Open
kanni-grand opened this issue Feb 28, 2019 · 5 comments
Open

Cannot Send payload - Connection not established! #32

kanni-grand opened this issue Feb 28, 2019 · 5 comments

Comments

@kanni-grand
Copy link

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?

@MikeHibbert
Copy link

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
Copy link

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

@ivanzhelyazkov
Copy link

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

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

@rmokros
Copy link

rmokros commented Apr 18, 2020

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

@StelicaRusu
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants