Questions tagged [python-socketio]

Python implementation of the Socket.IO realtime client and server.

205 questions
12
votes
2 answers

The WebSocket transport is not available, you must install a WebSocket server that is compatible with your async mode to enable it

When I development some socket.io service in python environment by using python-socketio and gunicorn, I meet an issue here. I am using Mac OS X and I am using python 3.7. Environment setting $ pip install python-socketio $ pip install…
Milo Chen
  • 3,617
  • 4
  • 20
  • 36
7
votes
1 answer

Expected ASGI message 'websocket.accept' or 'websocket.close', but got 'http.response.start'

I want to connect websockets, but I get an error at startup. uvicorn app:app --reload --ws websockets requirements OS: Linux Ubuntu 20.04 LTS Python 3.8.6 Browser: Chrome…
Dima
  • 112
  • 12
5
votes
1 answer

Python SocketIO KeyError: 'Session is disconnected'

On a small Flask webserver running on a RaspberryPi with about 10-20 clients, we periodically get this error: Error on request: Traceback (most recent call last): File…
Salvatore
  • 10,815
  • 4
  • 31
  • 69
5
votes
1 answer

How to emit message from python server to javascript client in python-socketio?

The socketio client successfully connects to the server and sends messages with emit to the server but the other direction server to the client fails. I cannot find the source of error. It is Here is the server python in app.py based on the example…
Mehdi
  • 4,202
  • 5
  • 20
  • 36
4
votes
2 answers

SocketIO to emit to a particular user (without using separate room for every client)

I am trying to develop a web application that supports a long task at the backend. I am using flask-socketio package on my server along with celery. My workflow is following : When a client opens the Html page -- I initiate a socket connection to…
Naman
  • 372
  • 4
  • 20
4
votes
2 answers

python-socketio vs Gevent-socketio

I am choosing a python library to write a live-chat function page embed in my website. I found two libraries that based on Socket.IO, python-socketio and gevent-socketio: From python-socketio doc: Python implementation of the Socket.IO realtime…
aircraft
  • 25,146
  • 28
  • 91
  • 166
3
votes
2 answers

TypeError: 'coroutine' object is not iterable

I build a chatapplication using Aiohttp server and using python-socket-io. When i tried to host this application in nginx i found this error in supervisor error from error log of supervisor(error log path= /var/log/gunicorn/gunicorn.err.log…
3
votes
1 answer

Python SocketIO: BadNamespaceError: / is not a connected namespace

I am attempting to setup an app that streams your webcam on a website (by following this tutorial with some modifications). When attempting to set it up through SocketIO, I get an error: socketio.exceptions.BadNamespaceError: / is not a connected…
vernal123
  • 129
  • 9
3
votes
3 answers

SocketIO "packet queue is empty, aborting” Error When Sending Message From Server

I am having an issue with sending a SocketIO message from a WSGI server to a SocketIO client. Messages going the other way (client to server) work fine without any issue. The code is in Python using the python-socketio package and eventlet to…
slalomchip
  • 779
  • 2
  • 9
  • 25
3
votes
0 answers

How to use python-socketio with django and reactjs?

I am getting this error when I am using reactjs with django: Not Found: /socket.io/ HTTP GET /socket.io/?EIO=4&transport=polling&t=NSwqecY 404 [0.02, 127.0.0.1:51874] wsgi.py ==>file in django project-- import os from django.core.wsgi import…
Praveen yadav
  • 125
  • 1
  • 9
3
votes
1 answer

Stop a blocking python thread after timeout

I'm having an issue that is really difficult to find an already made solution for it. I'm running a new python thread that is then blocked by a socket connection (python-socketio) because it is waiting indefinitely for data. But I need to close this…
3
votes
1 answer

python socketio communication with ssl related problem

I am using python socketio for communication and it works well for http. Have a problem when upgraded it to work with SSL. I made a self-signed root certificate (CA), and issued server.cert and server.key. I told the computer to trust the CA. After…
Tyrion
  • 405
  • 8
  • 22
3
votes
2 answers

How to send message on python-socketio

The API documentation (https://python-socketio.readthedocs.io/en/latest/intro.html) provides examples of the server and client. But if you run them, you will not start messaging. And I'm not sure how to set it up. How do I set up messaging so I can…
schmutov
  • 207
  • 1
  • 2
  • 13
3
votes
2 answers

Can't get multiple uwsgi workers to work with flask-socketio

In development, flask-socketio (4.1.0) with uwsgi is working nicely with just 1 worker and standard initialization. Now I'm preparing for production and want to make it work with multiple workers. I've done the following: Added redis message_queue…
Michielvv
  • 336
  • 4
  • 13
3
votes
1 answer

How to connect to 'normal' websocket using python-socketio?

As far as I understood, websocket is protocol and socketio is library that implements this protocol. So I decided to move from python websocket-client to python-socketio as it seems easier to implement behaviors with the decorator…
lucrib
  • 448
  • 1
  • 9
  • 21
1
2 3
13 14