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

Event name with dash causes crash in Python 3.5 #36

Closed
ghost opened this issue Jul 26, 2016 · 1 comment
Closed

Event name with dash causes crash in Python 3.5 #36

ghost opened this issue Jul 26, 2016 · 1 comment
Assignees
Labels

Comments

@ghost
Copy link

ghost commented Jul 26, 2016

Running flask-socket-io using Python 3.5 I ran into the following issue when trying to send a message with an event name containing a dash.

From .js client:

socket.on('connect', function() {
    socket.emit('connect-event', {data :  'Client connected'});
});

Error in Python 3.5
ValueError: invalid literal for int() with base 10:

Points to:
packet.py line 84

@ghost ghost closed this as completed Jul 26, 2016
@ghost ghost reopened this Jul 27, 2016
@miguelgrinberg
Copy link
Owner

Yes. The Socket.IO protocol uses a dash as a separator in the encoded packages, so a dash in an event name confuses things. I'll look at how the official Socket.IO server handles dashes and do the same here.

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

No branches or pull requests

1 participant