237 questions
0
votes
1
answer
45
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
181
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 ...
0
votes
0
answers
27
views
python server / JS client: socketio regular disconnects
In trying to reproduce errors from a larger project I have created a server using python's aiohttp and the following python-socketio (v5.12.0) namespace:
class MyNamespace(AsyncNamespace):
...
0
votes
0
answers
37
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....
0
votes
0
answers
73
views
How can I implement multithreading in socketio and FastAPI?
I have a FastAPI application. When the user enters a room id on frontend then a dedicated worker thread is started for each room that emits the time every second to the frontend. Apart from emit event ...
0
votes
0
answers
44
views
RuntimeError : Expected ASGI message 'websocket.accept' or 'websocket.close', but got 'http.response.start' [duplicate]
After updating my FastAPI version to fastapi[standard] to use fastapi-cli I got an error regarding sockets. I searched all the threads but couldn't find a solution. Could someone help me please?
# my ...
0
votes
0
answers
429
views
FastAPI 'reload' hangs and the application does not restart
I recently added sockets to my application, and since then the reload no longer works but gets stuck in the 'Shutting down' status
Here is a screenshot of the logs in the application.
Capture logs ...
3
votes
1
answer
1k
views
FastAPI RuntimeError: Expected ASGI message 'websocket.accept', 'websocket.close', or 'websocket.http.response.start' but got 'http.response.start'
I have server like:
main.py
import socketio
from fastapi import FastAPI
app = FastAPI()
sio = socketio.AsyncServer(async_mode="asgi", cors_allowed_origins="*")
sio_app = socketio....
0
votes
1
answer
57
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
120
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
51
views
Python sockio SimpleClient fails to connect to python-socketio
I've got a python backend with python-socketio as server. I have a react application which can connect to it just fine. However, my python client app always raises a 'connectionError'.
I need some ...
0
votes
1
answer
579
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
0
answers
63
views
Extra 0x00 at the start of TLS Client Hello packet, how to remove it?
I'm working on a Python proxy server that needs to receive TLS Client Hello data from a browser and forward it to the target server. However, I've noticed that the Client Hello packet sent by my proxy ...
1
vote
2
answers
148
views
How should I correctly configure tasks when using sockets in python?
I have this small snippet which I intend to have function as a server, I have managed to get the socket to connect to the client but cannot send data due to errors.
import asyncio
import json
import ...
0
votes
2
answers
80
views
Socket IO is rejecting requests from Nginx proxy
I have this docker application running several containers. One of these containers is a Python application that can handle both socket io requests and normal HTTP requests. Django's ASGI handles HTTP/...