TypeError while joining a room with Flask-SocketIO 5.0.1

Solution
@socketio.on('connect')
def connection():
    pass

@socketio.on('join-room')
def my_join_room(data):      # <--- rename this to something other than join_room
    roomId = data['roomId']
    camId = data['camId']
    join_room(roomId)
    emit('cam-connected', {'camId': camId}, broadcast=True)

@socketio.on('disconnect')
def on_disconnect():
    leave_room(roomId)
    emit('cam-disconnected', {'camId': camId}, broadcast=True)