Python implementation of the Socket.IO realtime client and server.
Questions tagged [python-socketio]
205 questions
0
votes
0 answers
using pyqt getting "QObject::setParent: Cannot set parent, new parent is in a different thread"
I'm creating a chat app with PyQt and socketio.
Whenever I want to add a new message widget to the scroll area this error appears "QObject::setParent: Cannot set parent, new parent is in a different thread"
This is my code:
import sys
from html…

Mohammad Armin Niknami
- 101
- 7
0
votes
1 answer
How to solve 401 Unauthorized error in Socket.IO Django framework?
I am trying to get the Socket.IO work with my Django server. Here is my setup:
Frontend js:
const socket = io.connect('127.0.0.1:8001');
socket.on('connect', () => {
console.log('socket id: %s\n', socket.id);
});
Django server:
from…

Jason Liu
- 749
- 4
- 16
- 34
0
votes
0 answers
socket.io works on localhost AND local network but not when deployed on a server
I am building a socket.io app with the python implementation on the server side and the JS client.
When I test my app on my machine everything works, I can connect with multiple clients and exchange data with the server.
The app also works, when I…

NIoSaT
- 423
- 6
- 22
0
votes
1 answer
engineio - Python3.7 async SyntaxError
I'm very much a novice at all of this. Trying to troubleshoot another application for raspberry pi, keep running into this issue. I've read that async is now a reserved word for Python 3.7, cant change the script in server.py. There is probably an…
0
votes
1 answer
How to use custom decorators in python-socketio server?
I'd like to use some custom decorators on event handlers in order to make working with sessions more comfortable.
Here is my event handler without custom decorator:
@sio.event
async def test(sid, data):
async with sio.session(sid) as sess:
…

PATAPOsha
- 372
- 3
- 18
0
votes
1 answer
Python-socketio Server.call() method does not seem to work with JavaScript client
Summarize the problem
I am using the python-socketio package as a server for a web-based game that I am creating. I initially implemented the client in Python (with python-socketio[client]) for debugging purposes, and made extensive use of the…

eshapiro42
- 186
- 1
- 2
- 14
0
votes
0 answers
python socket.io How to emit to a particular client?
there is a similar question for nodejs but I need for python also
node.js socket.io How to emit to a particular client?
I want to broadcast a message to an specific client based on some condition using socketio and flask from the connected…

Rabindra Nath Nandi
- 1,433
- 1
- 15
- 28
0
votes
0 answers
Can we run both Socket Server and Socket Client on the same Django Server?
I have a Django Server work as 2 role: Socket Server and Socket Client.
1/ As a Socket Server, it work on local side, so some clients in same network can connect and receive event.
2/ As a Socket Client, it will connect (using Socket) to another…

EmBeCoRau
- 327
- 1
- 4
- 14
0
votes
1 answer
access methods on one socketio namespace from a different one
I have a flask application that uses flask-socketio and python-socketio to facilitate communication between a socketio server in the cloud and a display device via a hardware device.
I have a display namespace which exposes the display facing…

Galax Womack
- 23
- 4
0
votes
2 answers
How would I 'listen' to/decorate a setter from an imported class
I'm not sure whether this is a great approach to be using, but I'm not hugely experienced with Python so please accept my apologies. I've tried to do some research on this but other related questions have been given alternative problem-specific…

Tom Bailey
- 321
- 2
- 11
0
votes
0 answers
Socketio error: @sio.event AttributeError: 'Client' object has no attribute 'event'
so I'm writing soem code for a ctf challenge, and basically I'm using socketio to communicate with a fake internal network, but when I run the following code with python3 bridge.py locked_out.logicdata, I get the following error: Socketio error:…

JustABeginner
- 321
- 1
- 5
- 14
0
votes
0 answers
Python3 socketio returning data from on_message to use in other python functions
I might be on the wrong path but I'm trying to do something like the following however the token never gets returned from on_message
import socketio
sio = socketio.Client()
token = ""
def on_message(data):
token = data.get('token')
token =…
0
votes
0 answers
Why the connection function is not activated when Python socketio client connects to Go socketio server?
I built a socket.io client by using Python Socket.IO:
import socketio
import time
sio = socketio.Client(logger=True, engineio_logger=True)
is_connect = False
@sio.on("connect")
def connect():
global is_connect
print("is_connect value…

Tyrion
- 405
- 8
- 22
0
votes
0 answers
flask-socketio Authorization header handling
I'm using a third party authentication service along with a guard on my on_connect method to handle user authentication against my socket connection. This is working as I had hoped, but I have noticed a couple things I am unsure how to solve.
The…

Galax Womack
- 23
- 4
0
votes
1 answer
flask-socketio Room events
Is there a way to limit the use of certain events to room members only? I don't need to limit to a specific room, but need to make sure the client has joined a room before the event is available for their use.

Galax Womack
- 23
- 4