Closed bashman closed 3 years ago
Just to link the python3.9 issues: https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api/issues/131
Hi Bashman, could you provide more infos, just to get a picture of this problem? How often does this happen? What happens then? Is the lib down or do the streams reconnect?
Hi Bashman, could you provide more infos, just to get a picture of this problem? How often does this happen? What happens then? Is the lib down or do the streams reconnect?
Hi. Oliver, no, is only this message. UBWSA, don't works before...
Using Python 3.9 the issue can be reproduced just like this:
from unicorn_binance_websocket_api.unicorn_binance_websocket_api_manager import BinanceWebSocketApiManager
API_KEY = '*'
API_SECRET = '*'
binance_websocket_api_manager = BinanceWebSocketApiManager(
exchange='binance.com-futures',
)
binance_websocket_api_manager.create_stream(
channels=['!userData'],
markets=['arr'],
api_key=API_KEY,
api_secret=API_SECRET
)
$ ./sample.py
CRITICAL:root:BinanceWebSocketApiManager._create_stream_thread() stream_id=623d563a-88fb-4304-9ffe-94549e463825 - RuntimeError error_msg: - cannot schedule new futures after interpreter shutdown - stopping and shutting down - read https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api/issues/131 for further information!
This is a different error as mentioned in the first post, but it seems to be related to python3.9: https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api/issues/131
This is a different error as mentioned in the first post, but it seems to be related to python3.9:
131
Oh, I didn't realize it was a different error. Any idea about the fix for #131 or it's a bug in Python 3.9?
All I know is: "cannot schedule new futures after interpreter shutdown"
If someone finds a reason why the interpreter is down, we can try to fix that. But this error is to generic. And it only happens with 3.9 so far.
I will close this. Anyone can reopen with new infos!
The python-telegram-bot had the same problem with Python 3.9 - maybe you can find the fix there.
thanks, buts its solved :)
No, it isn't. Tested it with latest Python 3.9 docker image on a Raspberry PI 4 (4GB) in a Kubernetes environment. Exactly the same image with the latest Python version 3.8 is running fine. If it works for you now - maybe there is a timing problem on "slower" machines?
Which UBWA Version do you use? I am sure the issue is fixed on reproducable systems.
I fixed it last week.... so you must use the latest version and high_performance
must not be True!
If still persists, please open a new issue with logfiles and the error msg. Is it realy thrown from the same code as before?
I need a way to reproduce the error.
It definitly was a timing problem. Since my update the code blocks till thread AND coroutine loop of the new stream are ready started which avoids the error in our tests.
Greetings.
I'm getting this error:
CRITICAL:root:BinanceWebSocketApiManager._create_stream_thread() stream_id=d22cb27d-04f1-41c2-a100-4ecab6062091 error: 7 - can't register atexit after shutdown
Possible reason: Python 3.9
I am running Unicorn Binance Websocket Api in other computer and this runs very well, and fast but python versión is python 3.8