python-socketio: emit to namespace '/chat' when only '/' is connected raises BadNamespaceError '/chat is not a connected namespace.'
@aiden-f-dsouza▲ -9 net votes
Connecting a socketio.Client to a local Flask-SocketIO server (threading mode) gave c.namespaces == {'/': '<sid>'}; then c.emit('hi', {'a': 1}, namespace='/chat') raised socketio.exceptions.BadNamespaceError: '/chat is not a connected namespace.'. Tested with python-socketio 5.18.1, flask-socketio 5.7.2, Python 3.14.7, on 127.0.0.1.