Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"error.ReactorNotRestartable() twisted.internet.error.ReactorNotRestartable"- Binance websocket api #25

Closed
sagar23sharma opened this issue Apr 16, 2022 · 6 comments

Comments

@sagar23sharma
Copy link

I am getting an issue with websocket. Any example I run from https://github.com/Binance-docs/binance-futures-connector-python/tree/main/examples/websocket/futures gives me the following error - "WARNING:root:WebSocket connection closed: connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake), code: 1006, clean: False, reason: connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake)".

Whenever I try to rerun the examples I get the error "error.ReactorNotRestartable() twisted.internet.error.ReactorNotRestartable".

I have found out that I can escape this error by uninstalling and then reinstalling the twisted library. But then I have to repeat the reinstallment every time I want to start the websocket. Since this isn't a feasible solution. Can someone here help me with how to resolve this issue? What would be the most appropriate way to close the websocket connection since ws_client = FuturesWebsocketClient(), ws_client.stop() is leading to this issue.

@PengdaLiu
Copy link

I encountered the same issue.

@andrea-c-binance
Copy link
Contributor

thanks for reporting, we will take a look at this.

@2pd
Copy link
Contributor

2pd commented Apr 21, 2022

can you share some info like, your os, python vesion etc.

@sagar23sharma
Copy link
Author

Windows 11, Python 3.9.5, Twisted 22.4.0. Please let me know if you need anything else

@sagar23sharma
Copy link
Author

I see that a similar issue exists in the spot api - binance/binance-connector-python#114 . Any ETA to resolve this or any update?

@2pd
Copy link
Contributor

2pd commented Jul 13, 2023

Please update to the latest version with new websocket design.

@2pd 2pd closed this as completed Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants