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

Assertion error when connecting to python-socketio server #15

Open
JeremyVarghese opened this issue Mar 11, 2020 · 1 comment
Open

Assertion error when connecting to python-socketio server #15

JeremyVarghese opened this issue Mar 11, 2020 · 1 comment

Comments

@JeremyVarghese
Copy link

I created a socketio server and tried to connect an esp32 to the server. On the server side, it is showing that it is connected but on the client side, on the esp32 by using the following code
uri='http://192.168.56.1:5000' with usocketio.client.connect('http://127.0.0.1:5000/') as sio:
it shows an assertion error on line 123 of client.py
File "usocketio/client.py", line 123 in connect Assertion Error
To test what was wrong, I added a print line before that line
packet = socketio._recv() print("packet:",packet) ####### assert packet == (PACKET_NOOP, '')
which gives an output
packet: (None,None)

I am new to websocket communication and event driven programming is best suited for my usage but I am unable to understand what the error is.

@danni
Copy link
Owner

danni commented Mar 20, 2020

It looks like you're possibly timing out before receiving a packet and it's not okay with that. I'm afraid you'll have to debug this on your own. If you want to try using more conventional web-driven programming, try the branch in this PR: #13

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