2

I'm trying to get the simple example of Flask-SocketIO working, but I'm getting an error saying I'm missing a required positional argument 'mode', even though the documentation / official example don't show such a parameter:

enter image description here

Nathan Wailes
  • 9,872
  • 7
  • 57
  • 95

1 Answers1

6

After a lot of head-scratching, I realized it was happening because I accidentally imported the wrong SocketIO with my IDE: I imported socket.SocketIO instead of flask_socketio.SocketIO. When I fixed the import statement the error went away.

Nathan Wailes
  • 9,872
  • 7
  • 57
  • 95