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

How does Binance Binance Public API Connector Python get the error location? , just report the error reason #211

Open
1163849662 opened this issue Feb 20, 2023 · 2 comments
Labels
reviewing reviewing the issue

Comments

@1163849662
Copy link

image

@1163849662
Copy link
Author

#!/usr/bin/env python

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()
截屏2023-02-21 上午11 52 23

@2pd 2pd added the reviewing reviewing the issue label Feb 21, 2023
@alplabin
Copy link
Contributor

@1163849662 Are you still experiencing this error with the latest version? I tried to replicate it but couldn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reviewing reviewing the issue
Projects
None yet
Development

No branches or pull requests

3 participants