Error:
Traceback (most recent call last):
File "E:\xx.py", line 10, in
from binance.websocket.spot.websocket_api import SpotWebsocketAPIClient
File "E:\xxx\venv\Lib\site-packages\binance\websocket\spot\websocket_api__init__.py", line 6, in
class SpotWebsocketAPIClient(BinanceWebsocketClient):
File "E:\xxx\venv\Lib\site-packages\binance\websocket\spot\websocket_api__init__.py", line 39, in SpotWebsocketAPIClient
from binance.websocket.spot.websocket_api._market import ping_connectivity
File "E:\xxx\venv\Lib\site-packages\binance\websocket\spot\websocket_api_market.py", line 1, in
from binance.lib.utils import get_uuid, purge_map
ImportError: cannot import name 'get_uuid' from 'binance.lib.utils' (E:\xxx\venv\Lib\site-packages\binance\lib\utils.py)
1. install new binance-connector-python(3.7.0) 2. install binance-futures-connector(4.0.0) 3. Run below code:
`from binance.websocket.spot.websocket_api import SpotWebsocketAPIClient
def messagehandler(, message): logging.info(message)
proxies = { 'http': 'http://1.2.3.4:8080' }
my_client = SpotWebsocketAPIClient(on_message=message_handler, proxies=proxies, timeout=10)
my_client.ticker(symbol="OPUSDT", type="FULL")
time.sleep(5) logging.info("closing ws connection") my_client.stop()`
Error: Traceback (most recent call last): File "E:\xx.py", line 10, in
from binance.websocket.spot.websocket_api import SpotWebsocketAPIClient
File "E:\xxx\venv\Lib\site-packages\binance\websocket\spot\websocket_api__init__.py", line 6, in
class SpotWebsocketAPIClient(BinanceWebsocketClient):
File "E:\xxx\venv\Lib\site-packages\binance\websocket\spot\websocket_api__init__.py", line 39, in SpotWebsocketAPIClient
from binance.websocket.spot.websocket_api._market import ping_connectivity
File "E:\xxx\venv\Lib\site-packages\binance\websocket\spot\websocket_api_market.py", line 1, in
from binance.lib.utils import get_uuid, purge_map
ImportError: cannot import name 'get_uuid' from 'binance.lib.utils' (E:\xxx\venv\Lib\site-packages\binance\lib\utils.py)
futures-connector rewrite utils.py file?