Failed with TypeError #1591
Replies: 3 comments
-
First of all you are using a WebSocket client to test this, not a Socket.IO client (they're different). Second, you are connecting to the root URL of your web server, not to the Socket.IO endpoint. I recommend you test your server with a Socket.IO client. |
Beta Was this translation helpful? Give feedback.
-
You're right, with a socket.io javascript client it works fine, but it would still be nice if the server doesn't show stub or code debugging when someone sends a manual websocket request. |
Beta Was this translation helpful? Give feedback.
-
@WHK102 Reread what I said above. You were sending a WebSocket request to the root URL of your server. That has nothing to do with Socket.IO. or this package. You can see in the stack trace that the error comes from gevent, not from this package. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
When use Flask and Flask-SocketIo says an error:
I test using netcat:
Or with curl same issue:
But with echo.websocket.org works fine:
In the code using a simple Flask app and SocketIO wrapper. In StackOverflow says the problem is a incompatibility with python3: https://stackoverflow.com/questions/38269696/python-flask-socketio-typeerror-a-bytes-like-object-is-required-not-str :
But in the pip package says the module is for python3.
Beta Was this translation helpful? Give feedback.
All reactions