如何获取Binance Public API Connector Python中具体的错误信息,报错只返回原因没有位置

你可以简单的贴一个代码么,可以重新这个问题。

#!/usr/bin/env python
#sample code,error in print(1/0)
import logging
import time
from binance.lib.utils import config_logging
from binance.websocket.spot.websocket_api import SpotWebsocketAPIClient

config_logging(logging, logging.DEBUG)

def on_close(_):
logging.info("Do custom stuff when connection is closed")

sample code,error in print(1/0)
def message_handler(_, message):
logging.info(message)
print(1/0)

my_client = SpotWebsocketAPIClient(on_message=message_handler, on_close=on_close)

my_client.aggregate_trades(symbol="BNBBUSD", limit=1, fromId=0)

time.sleep(2)

logging.info("closing ws connection")
my_client.stop()

谢谢,我们研究下。