Python implementation of the Socket.IO realtime client and server.
Questions tagged [python-socketio]
205 questions
0
votes
2 answers
Cannot emit message to room using Flask-SocketIO
I am building a simple chat app and I have been trying to emit messages to rooms with Flask-SocketIO.
The "mesage_event" event from the client reaches the server well, but then, I cannot see anything on the client side. I don't know whether the…

mizar
- 259
- 1
- 3
- 10
0
votes
0 answers
How do I preserve the docstring in an event handler (python-socket, sphinx)
I'm trying to use sphinx autodoc to generate documentation for my python project. I can't seem to be able to preserve the docstring in this code:
class aps_sio():
def __init__(self, server, port, mav, is_sim=False):
########## ASYNC IO…

MjBVala
- 137
- 3
- 9
0
votes
1 answer
Why does flask_socketio.disconnect prevent the thread from completing?
I have the following system: [Client] - [Web Server] - [Connecotr].
A connector is a kind of intermediate code between a web server and a data source.
I need to monitor the server connection with the connector. If the connection is lost, then I must…

ioprst
- 187
- 16
0
votes
1 answer
Issues with Chat App , React Native and FlaskBackend and flask_socketio
I'm trying to create a project and one of its functionalities is having a chat. The structure for chat is: App made in React Native and the backend i'm using Flask. For the backend i have many different routes and my intention is to create another…

Marcos Paulo Júnior
- 355
- 1
- 4
- 14
0
votes
0 answers
SocketIO. Not work separation on namespace
I have the following system: [Clietn] --- [Web Server (Flask)] --- [Data source].
The data source connects to the server and sends new data endlessly. The server, having received the new data, sends it to the client. The exchange is organized using…

ioprst
- 187
- 16
0
votes
1 answer
In python socketio RuntimeWarning: coroutine 'initial' was never awaited despite writing an await statement
python3 client.py
/home/aijax/.local/lib/python3.6/site-packages/socketio/client.py:592: RuntimeWarning: coroutine 'initial' was never awaited
self._handle_event(pkt.namespace, pkt.id, pkt.data)
connection established
despite of having the await…

aijax
- 47
- 10
0
votes
1 answer
Cannot use self in python-socketio
I can't use self in a class.It seems that the data of the function after the decorator is the first parameter.
Example:
import socketio
import random
sio = socketio.Client()
class Test:
def __init__(self):
self.uid =…

ideasource
- 11
- 3
0
votes
1 answer
Daphne server unable to handle http requests
I have a django application that I want to deploy using daphne.
Django application supports both websockets and http requests. I've converted the django to support ASGI.
I'm starting the server using :
daphne .asgi:application
The…

Harsh Pancholi
- 13
- 1
- 3
0
votes
1 answer
problem with socketio emit event - python 2.7 client to nodejs server
I have looked at a lot of similar problems on message boards and read the related documentation and from what I can tell it seems like I am doing everything right.
node server code
io.on('connection', function(socket){
logger.log('info',…

saulgudmon
- 11
- 3
0
votes
0 answers
Django 2.1.5 migration does not happen with makemigrations command
In our Django project(Django 2.1.5), every time we try to run the project we have to give the '--noreload' command in addition to the runserver command, else the project returns an error as,
ValueError: signal only works in main thread
We are…

harish
- 21
- 1
- 4
0
votes
0 answers
Python SocketIO-client doesn't receive emits from nodeJS server
So this is what I am trying to do, I want to be able to send a message in a browser towards a python script. I've got to the point where I can send a message in the browser and the server sees it. For testing purposes I used io.emit('input', data)…

Wouter
- 11
- 1
- 6
0
votes
2 answers
How to add self-signed certificate to PyCharm?
I need PyCharm (2019.1.1, on macOS Mojave) to accept my self-signed SSL certificate when running python-socketio client and flask-socketio server.
I have tried to add the self-signed certificate to PyCharm via Preferences/Tools/Server Certificates.…

Tyrion
- 405
- 8
- 22
0
votes
1 answer
Python socket.io client fails on event with dictionary and list message
I have python-socketio==4.3.1 installed, and I can connect to the socket.io server correctly.
Whenever I receive a message though, I get an exception. The data I would get would be a list on the connect event, and a dictionary on message…

stamas
- 397
- 1
- 3
- 16
0
votes
1 answer
How to solve the CORS error in Socket.IO Django framework using Python 2.7
We are using AngularJS and Django frontend and backend respectively. We are facing CORS error as we added corsheaders in installed_app and also added middlewares still we are facing the same problem
We are using AngularJS v1.6.3, Django 1.10.11 and…

Aditya
- 51
- 1
- 6
0
votes
0 answers
How to catch websocket 502 exception
I'm using Python Socket.IO server and client and websocket client for python to create a tunnel from my Raspberry Pi to my server on AWS.
My tunnel works great, apart from when the server disconnects due to an error. When this happens, this is the…

Dan Sheinin
- 59
- 10