You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "C:\Program Files (x86)\Python37-32\lib\site-packages\flask_socketio\__init__.py", line 408, in emit
sid = flask.request.sid
File "C:\Program Files (x86)\Python37-32\lib\site-packages\werkzeug\local.py", line 348, in __getattr__
return getattr(self._get_current_object(), name)
AttributeError: 'Request' object has no attribute 'sid'
For now I have resolved setting request.sid to the session id of the client I want to send my event to (same as the room), but I don't know if this could cause problems.
The text was updated successfully, but these errors were encountered:
socketio.emit with a callback raises an error if called outside a SocketIO event handler.
If I call it in a normal route handler, for example:
it throws error
For now I have resolved setting request.sid to the session id of the client I want to send my event to (same as the room), but I don't know if this could cause problems.
The text was updated successfully, but these errors were encountered: