I am trying to create a live chat app using flask socket-io. But where I use connect event it shows this "Method must have a first parameter, usually called 'self' " error. How can I fix this. I am using flask-socketio 4.3.0. Here is my code.
@socketio.on('disconnect')
def disconnect():
print('Client disconnected')
@socketio.on('connect')
def connect():
print("Client connected")
here is screen shot.