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

python-binance not working with Python 3.10? #1391

Open
chiwalfrm opened this issue Jan 16, 2024 · 1 comment
Open

python-binance not working with Python 3.10? #1391

chiwalfrm opened this issue Jan 16, 2024 · 1 comment

Comments

@chiwalfrm
Copy link

Describe the bug
nothing received on websocket

To Reproduce

import asyncio
from binance import AsyncClient, BinanceSocketManager

async def main():
        client = await AsyncClient.create()
        bm = BinanceSocketManager(client)
        # start any sockets here, i.e a trade socket
        ts = bm.trade_socket('BTCUSDT')
        # then start receiving messages
        async with ts as tscm:
                while True:
                        res = await tscm.recv()
                        print(res)
        await client.close_connection()

if __name__ == "__main__":
        loop = asyncio.get_event_loop()
        loop.run_until_complete(main())

Expected behavior
Essentially the line "res = await tscm.recv()" never finishes. Nothing is received.

Environment (please complete the following information):

  • Python version: 3.10.12
  • Virtual Env: [e.g. virtualenv, conda]
  • OS: Ubuntu
  • python-binance version 1.0.19

Logs or Additional context
Add any other context about the problem here.

@luk0y
Copy link

luk0y commented Mar 4, 2024

I am on Python 3.10.12 and Ubuntu 22.04
python-binance version is 1.0.19
I can verify this code is working fine.

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

No branches or pull requests

2 participants