1,086 questions
0
votes
0
answers
35
views
flask-scoketio: emitting from an external process without a message queue
I am developing a project using flask, flask-socketio, and the Multiprocessing python libraries.
My site runs on localhost (127.0.0.1:5000).
The goal is to update the html template every second from ...
0
votes
1
answer
46
views
Socketio background task issues with pubsub subscription
I am running a gunicorn server with 1 eventlet worker through which I communicate with the FE via websockets.
However, I also need to listen to an external pod running some code that will emit a redis ...
0
votes
1
answer
58
views
Flutter web + flask_socketio: flutter app can't connect to flask socketio
I am trying to run a Flutter web frontend and a python flask + flask_socketio api/socketio backend in a docker compose file. The frontend image uses nginx as a reverse proxy, and its configuration ...
0
votes
1
answer
189
views
Server.emit() got an unexpected keyword argument 'broadcast' with Flask-SocketIO
Note: There is a discussion at GitHub but nothing was concluded.
I am getting error - "Server.emit() got an unexpected keyword argument 'broadcast'" after python update from 3.8 to 3.11 in ...
2
votes
1
answer
42
views
SocketIO in React app does not capture emitted event
I am trying to build a Leaderboard that updates real-time based on redis stream events.
So I have this code in my frontend component that ultimately should be getting the latest updates real-time from ...
0
votes
0
answers
40
views
RevPi connection using Websockets
I am trying to connect a revpi to a windows pc to exchange input events using websockets. The server(revpi) looks as such:
@app.route('/init', methods=['GET'])
def initialize():
rpi.io.O_Unlock....
1
vote
2
answers
125
views
Run a simple flask web socket on Render
I'm new to Render , and I make a simple flask web socket
I use these modules:
,flask_socketio
,flask
,gunicorn (to run my script on Render host)
Here is my code for server side:
from flask import ...
0
votes
2
answers
149
views
Use Flask-SocketIO to send messages continuously
I would like to build an application to monitor files on my local computer through the browser. I have written a minimalistic example to illustrate this.
The frontend should be able to request ...
1
vote
1
answer
92
views
How to Store WebSocket Data Per User or session in Flask Using flask-sock
I'm developing a Flask web application and using flask-sock for WebSocket communication. I need to pass WebSocket data received in send_output_with_context into filtered_chat_memory inside the index ...
0
votes
1
answer
118
views
Why azure viseme data is not completely generated in linux?
So Im trying to generate speech and viseme data for my animation using azure services. But I have a problem when I run the exact same code in the Linux ubuntu 22.04.
When I run it in windows 11 with ...
0
votes
1
answer
43
views
emit Broadcast with flask_socketio
I have a flask server running, and sockets are connection successfully. I want to run a service that monitors stuff on my server, such as GPU usage with GPUMonitorService, and the broadcast that data ...
-1
votes
1
answer
25
views
Two functions reach the identical socketio.emit line. One emits the other doesn't. Can't wrap my head around it
from flask import Flask, send_from_directory
from flask_socketio import SocketIO
import time
import threading
import os
import serial
# Serial Configuration (Modify COM Port if needed)
SERIAL_PORT = &...
0
votes
0
answers
42
views
flask socketio backgroundtask stops after http post
Anytime I sent a post request to /tts/say or any other post request, the background task stops. Why is that and most importantly, how can I stop this behavior? I wasn't able to find more useful ...
0
votes
1
answer
40
views
socket.io.emit() not running inside redis function
I'm building a Flask application where I use Redis to receive data from a server, and then send that data to the frontend using Socket.IO. However, the emit() function is not sending the data to the ...
0
votes
0
answers
55
views
Client can send but not receive. (server: Flask SocketIO python) (client: socket.io.min.js)
I've got about 100 lines of code that require some expertise. I'm working on a classic client-server structure using flask and websockets. The communication from the client to the server works fine, ...
0
votes
0
answers
79
views
Flask-Session not persisting session data with Flask-SocketIO
I am deploying a Flask app with gunicorn using Flask-Socketio and Flask-Session.
On the 'connect' event I want to store the clients session id server-side using Flask-Session to identify the client on ...
0
votes
0
answers
24
views
Python flask_socketio + pty recieve handler not being called
So, I have some code for a flask_socketio virtual console. I can see the output, but when to send in a command, recv isn't called.
Code:
@socketio.on('connect')
def test_connect(auth: str):
def ...
0
votes
0
answers
94
views
Failed to deliver acknowledgement to Rabbit MQ (flask socket io + gevent +celery)
We are facing an issue with while running the flask application using flask-socketio and a background process using celery, where celery is unable to pick tasks from queue after successfully executing ...
1
vote
1
answer
260
views
Socket.io not working when updating from Angular v16 to Angular v17
I am maintaining a website built using Angular v16 and I am updating it to Angular v17. I've followed the update guide from the official angular website (link) and I use Angular Material (relevant for ...
0
votes
1
answer
63
views
flask-socketio server not connect to python-socketio client by polling
Q: I have a flask server application by flask-socketio, it is :
from flask import Flask
from flask_socketio import SocketIO
app = Flask(__name__)
# CORS(app, supports_credentials=True)
app.config['...
0
votes
0
answers
125
views
Why Flask-SocketIO ends with 'Invalid session error'?
I'm testing the Flask-SocketIO package. My config is:
Server: Synology NAS DS218J (unix) on local network, running the basic example over Python 3.9.14.
Python script running on server:
from flask ...
0
votes
1
answer
321
views
Issue in using astream_events in Flask for streaming data to the frontend
I'm unable to stream data to the frontend using astream_events. I'm working on a Langchain and Flask project.
My code related to the streaming:
agent_executor = AgentExecutor(agent=agent, tools=tools, ...
0
votes
1
answer
596
views
Flask Blueprint with socketio configuration
My problem 🥲
I have a Flask app that I recently separated into blueprints as it grew in size.
All of the app migrated well except for one thing - socketio.
My goal is to have a socketio background ...
0
votes
1
answer
2k
views
Socket.io client disconnects with "transport error" immediately after successful connection
I’m working on a web app with a Python Flask backend that uses Flask-SocketIO for WebSocket connections, and the frontend client is built with React using the socket.io-client library. Everything ...
2
votes
1
answer
241
views
Connexion routes not populating url_map when using Flask-SocketIO
I’m working on a minimal working example with Connexion and Flask-SocketIO. My openapi.yaml defines two routes, but the url_map only shows one static route when I run the app.
What I’m trying to ...
0
votes
0
answers
53
views
The problem of continuously refreshing data from the threading section of socketio.on in the flask back end in a multi-user environment
This is the first time I use flask as the backend, and I expect the data on my web page to be updated every 200s. So I use while true with time.sleep (200) in each module and transfer the data via ...
0
votes
0
answers
61
views
How to properly record and send audio data from react to backend
I want to send audio data from react in a interval of approx. 10sec to my flask backend. Here is my code, it is working but music format is not write.
React Code:
useEffect(() => {
socket....
0
votes
0
answers
58
views
Emit gets stuck while another thread is being executed
This is a Flask Socket-io App, In this particular code, A stream of response is being carried out by an AI model and chunks are being emitted regularly.
The issue here is that the Emit gets called ...
0
votes
0
answers
131
views
Handling CORS with Wildcard Subdomains in Flask-SocketIO
I'm trying to configure Flask-SocketIO to handle CORS for multiple subdomains (e.g., cors_allowed_origins='*.domain.com').
allowed_origins = [
'https://*.domain.com',
'http://*.localdomain.com' # ...
-2
votes
1
answer
235
views
Websockets vs socket.io for Flask
Can we use Websockets for flask application instead of flask-socketio?
I created a trading project in which i am using websockets to build socket connection between client and the server. next, i ...
0
votes
2
answers
411
views
Python Flask SocketIo async
How can I make the socket run asynchronously?
This code doesn't work now. Nothing happens when the socket is called.
I need to call an asynchronous function internally. What should I do?
Here is my ...
1
vote
0
answers
77
views
Elastic Load Balancer Managing Requests Sequentially Instead of Concurrently - Configuration Issues?
I am deploying a Flask application using Gunicorn with Flask-SocketIO on AWS Elastic Beanstalk. I’m experiencing issues where my Elastic Load Balancer (ELB) seems to handle incoming requests ...
0
votes
1
answer
58
views
How do I use SocketIO to store and send multiple pieces of data at once?
I am making a Fast Food Management system and I need to find a way to send order information from a client app to a main server, for it to be shown in a similar way to that in McDonald's, with the ...
0
votes
0
answers
85
views
Why is The Socket Unable To emit to my Frontend?
I have a Flask Route which needs to asynchronously send warnings to the front end and I am using SocketIO() for that purpose, here is what i did...
FLASK....
@app.route('/gotopagefullscreen', methods =...
0
votes
0
answers
43
views
Why is my main thread immediately stopping and exiting?
I'm implementing two-sided conversation transcription using Python Flask and React.js.
I'm getting audio streams from microphone and speaker using the Python SoundCard library.
I'm transcribing from ...
0
votes
1
answer
96
views
Flask-SocketIO v5.2.0 join_room sid key error when using python-socketio v5.11.2
python-socketio v5.11.2 is causing my flask server (Flask-SocketIO v5.2.0) to create a key error when invoking join_room.
Client first connects, then returns a key error when joining a room.
It seems ...
0
votes
1
answer
270
views
Python - PySide6 button click event not working after disconnecting and connecting new slot
I am creating some buttons and assigning click events to them. Each button is assigned to a dialog window where data can be entered. After entering that data it's sent to a flask server, flask server ...
0
votes
0
answers
75
views
How can I use http protocols for an app running on Windows from another app running on WSL Ubuntu?
my question may be very basic, I am deploying to a flask app, using the wsgi gunicorn and sockets, it is running WSL ubuntu 20.04. 6 LTS, inside it I make a POST to another application which I have it ...
0
votes
0
answers
46
views
flask_socket not working on live server (aws ec2 instance) but work localy
i am try to connect socket with angular app with flask_socket library but when i try to connect with live server which deploy on aws ec2 its give error code of 404 but its working if i run flask ...
2
votes
1
answer
404
views
Flask-socketIO with Gunicorn on the cloud not working
I've build a test app (testing for RESTfull Api) to process some POST requests from another app.
When both apps are run localy from PyCharm everything works ok - POST request activates a function ...
0
votes
1
answer
60
views
How do I pass a JavaScript variable to Flask?
I'm relatively new to JavaScript. I have a function in flask which I want to call, but it requires arguments which can only be defined in JavaScript.
var socket = io();
socket.connect('http://127.0.0....
0
votes
0
answers
79
views
how to send a push notification using flask-socketio
I want to send notifications even to offline users in Flask-socketio through their browsers.
I am making a web-based chat application using flask-socketio, I want to send notifications to users via ...
0
votes
1
answer
70
views
Chat messages duplicated when reloading page - Flask chat application
I have created a chat application in flask that has option to dm your friends. The messages save and load from the database. However when you refresh the page it will duplicate all the messages and ...
1
vote
1
answer
46
views
list of users who are online - Flask Gunicorn Gevent
I have a Flask application (for user authentication I use flask-login, flask-session). I use gunicorn with gevent and flask_socketio to run it.
I have a task to display a list of users who are online ...
0
votes
1
answer
54
views
launcher runs apps for only authorized people
I'm trying to develop a simple application launcher where the the application can't be launched only be launcher which checks if the user is authorized to launch the app or not, I can do this online ...
0
votes
1
answer
30
views
/handleClick route is not routing to rendered template in flask
I am not able to open test.html by rendering in flask.
I am trying to send data of a movie card to other page: test.html if the card is clicked.
I have taken the approach of onclick(event) function ...
3
votes
2
answers
67
views
Prevent fetch making unwanted requests
fetch is making multiple unwanted requests, I tried the below but it still makes 6 to 10 requests
const [allowParse, setAllowParse] = useState<boolean>(true);
socket.on("upload_finished&...
0
votes
1
answer
247
views
from flask_socketio import SocketIO, emit 2024-03-26T19:36:49.794996719Z: [ERROR] ModuleNotFoundError: No module named 'flask_socketio
I'm trying to my app.py file on azure. The files runs locally fine but when I deploy this app on azure with all libraries in requirements.txt. it gives me this error.
from flask_socketio import ...
0
votes
0
answers
48
views
Python-SocketIO , Yoloface: Is there a possibility that a function call is blocking my main thread?
I am working on a Flask Server with SocketIO. I emplemented an event handler and this is working fine (i implemented the client in a Adroid Studio Project). I can emit and receive Messages without any ...
2
votes
0
answers
270
views
Trouble with using python-engineio, python-socketio and Flask-SocketIO in my Python flask application
I am currently developing a flask application with Python and have a few different requirements.
First off, I need to implement a websocket server in order to have real time communication with clients ...