LUCIT-Systems-and-Development / unicorn-fy

A Python SDK by LUCIT to convert received raw data from crypto exchange API endpoints into well-formed python dictionaries.
https://unicorn-fy.docs.lucit.tech
MIT License
54 stars 20 forks source link

Exception in thread _create_stream_thread #42

Closed byimrez closed 5 months ago

byimrez commented 2 years ago

Version of this library.

unicorn-binance-websocket-api==1.41.0 unicorn-fy==0.12.2

Solution to Issue cannot be found in the documentation or other Issues and also occurs in the latest version of this library.

Hardware?

VPS or other cloud hosting

Operating System?

Windows

Python version?

Python3.10

Installed packages

pip install unicorn-binance-websocket-api --upgrade

Logging output

Exception in thread _create_stream_thread:  stream_id=, time=1661778274.3499045:
Traceback (most recent call last):
  File "C:\Program Files\Python310\lib\threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "C:\Program Files\Python310\lib\threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "\venv\lib\site-packages\unicorn_binance_websocket_api\manager.py", line 529, in _create_stream_thread
    loop.run_until_complete(socket.start_socket())
  File "C:\Program Files\Python310\lib\asyncio\base_events.py", line 646, in run_until_complete
    return future.result()
  File "\venv\lib\site-packages\unicorn_binance_websocket_api\sockets.py", line 139, in start_socket
    received_stream_data = self.unicorn_fy.binance_com_futures_websocket(received_stream_data_json)
  File "\venv\lib\site-packages\unicorn_fy\unicorn_fy.py", line 129, in binance_com_futures_websocket
    return UnicornFy.binance_futures_websocket(stream_data_json,
  File "\venv\lib\site-packages\unicorn_fy\unicorn_fy.py", line 647, in binance_futures_websocket
    if stream_data['data']['e'] == 'aggTrade':
KeyError: 'data'

Processing method?

process_stream_data

Used endpoint?

binance.com-futures

Issue

Hello, I got this error : Exception in thread _create_stream_thread: stream_id=, time=1661778274.3499045:Exception in thread _create_stream_thread: stream_id=, time=1661778274.3499045: Traceback (most recent call last): File "C:\Program Files\Python310\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "C:\Program Files\Python310\lib\threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "\venv\lib\site-packages\unicorn_binance_websocket_api\manager.py", line 529, in _create_stream_thread loop.run_until_complete(socket.start_socket()) File "C:\Program Files\Python310\lib\asyncio\base_events.py", line 646, in run_until_complete return future.result() File "\venv\lib\site-packages\unicorn_binance_websocket_api\sockets.py", line 139, in start_socket received_stream_data = self.unicorn_fy.binance_com_futures_websocket(received_stream_data_json) File "\venv\lib\site-packages\unicorn_fy\unicorn_fy.py", line 129, in binance_com_futures_websocket return UnicornFy.binance_futures_websocket(stream_data_json, File "\venv\lib\site-packages\unicorn_fy\unicorn_fy.py", line 647, in binance_futures_websocket if stream_data['data']['e'] == 'aggTrade': KeyError: 'data'

oliver-zehentleitner commented 2 years ago

This is not a bug of UBWA, but of UnicornFy: https://github.com/LUCIT-Systems-and-Development/unicorn-fy

oliver-zehentleitner commented 5 months ago

Duplicate of https://github.com/LUCIT-Systems-and-Development/unicorn-fy/issues/41