flask-socketio

How can I render new Template with Flask Socket-IO join event?

How can I render new Template with Flask Socket-IO join event? Question: I’m programming a litte multiplayer game with Flask Socket-IO. If the client is on the website, he connects to the websocket. On the start page the client should type a nickname in the field and press the button. Then the client tries to …

Total answers: 1

Python socketIO callback is lost: `Unknown callback received, ignoring.`

Python socketIO callback is lost: `Unknown callback received, ignoring.` Question: I have a Flask-SocketIO server that connects with a number of python-socketIO clients. I want to know which clients are online. To get to know this, I am sending a ping event from the server with a callback function to process the response. The structure …

Total answers: 1

TypeError: Object of type Response is not JSON serializable (2)

TypeError: Object of type Response is not JSON serializable (2) Question: I have been trying to serialize an SQLAlchemy model so that I can pass a number of data from flask server to an html socketio client. I am trying the following where an object is frirst converted into a dictionary and then jsonified. However, …

Total answers: 1

Unable to handle click events for individual buttons

Unable to handle click events for individual buttons Question: What I want to do: I have two buttons in my html client. I want to handle button click events on the server side using two different and separate event-handler functions. I will click any button, and upon clicking, the client will send a text message …

Total answers: 1

How can I send a request to flask socket.io with the click of a button?

How can I send a request to flask socket.io with the click of a button? Question: The following source code sends a request to the server upon page load, and when the task is done, the page is updated automatically. app.py from flask import Flask, render_template from flask_socketio import SocketIO, emit, disconnect from time import …

Total answers: 1

How do i run a flask_socketio application with ssl enabled?

How do i run a flask_socketio application with ssl enabled? Question: Hello im trying to run a flask_socketio application with ssl. The Code: if __name__ == ‘__main__’: socketio.run(app, host="0.0.0.0", port="80", debug=True, ssl_context=context) The Error: * Restarting with stat * Debugger is active! * Debugger PIN: 102-422-495 Exception in thread Thread-1: Traceback (most recent call last): …

Total answers: 1

Meraki API – Redirect stdout, stderr to websocket or file

Meraki API – Redirect stdout, stderr to websocket or file Question: I’m using a Flask route to call the Meraky python library and trying to redirect the stdout and stderr of each API call to a websocket or eventually a log file, here the code I’m using: import meraki from contextlib import redirect_stdout, redirect_stderr import …

Total answers: 1

The client is using an unsupported version of the Socket.IO or Engine.IO protocols Error

The client is using an unsupported version of the Socket.IO or Engine.IO protocols Error Question: I’m trying to run a client an server in python using flask_socketio, socketIO_client and SOCKET.IO in a raspberry pi 4 but I’m getting the following error: The client is using an unsupported version of the Socket.IO or Engine.IO protocols (further …

Total answers: 5

Swift socket.io compatible version with server python-socketio

Swift socket.io compatible version with server python-socketio Question: I’ve searched couple of days for it but found nothing to fix this issue. My client is an iOS device running socket.io v15.2.0 (Oct 17, 2019). I’ve followed this post (Implement a WebSocket Using Flask and Socket-IO(Python)) That post described how to connect to the python socket …

Total answers: 2

App engine, Flask-Socketio server Cors_Allowed_Origins header is missing

App engine, Flask-Socketio server Cors_Allowed_Origins header is missing Question: When I try to send a request from the client to my socketio flask server that is deployed on app engine I recieve the following error: has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. I did put the following …

Total answers: 3