socketio.exceptions.ConnectionError: OPEN packet not returned by server
See original GitHub issueI want to run my Socket-IO Client with Docker, but I get the following error message when trying to connect to my Socket-IO Server (written in JavaScript).
Traceback (most recent call last):
File "client.py", line 14, in <module>
sio.connect('http://' + server_address + ':3000')
File "/usr/local/lib/python3.8/dist-packages/socketio/client.py", line 280, in connect
raise exceptions.ConnectionError(exc.args[0]) from None
socketio.exceptions.ConnectionError: OPEN packet not returned by server
Socket-IO Client:
import socketio
import os, sys
# Connect to socket io server
sio = socketio.Client()
server_address = os.environ.get('SERVER_ADDRESS')
if server_address:
print('http://' + server_address + ':3000')
sio.connect('http://' + server_address + ':3000')
else:
sio.connect('http://<default ip>:3000')
Dockerfile:
FROM ubuntu:latest
ARG SERVER_ADDRESS
ENV SERVER_ADDRESS $SERVER_ADDRESS
RUN apt-get update -y && apt-get install -y python3 python3-pip
RUN pip3 install pyserial python-socketio requests
COPY ./flir-config .
COPY ./find_serial_device.py .
CMD ["python3", "client.py"]
Issue Analytics
- State:
- Created 3 years ago
- Comments:18 (7 by maintainers)
Top Results From Across the Web
python socketio - open packet not returned by the server
client connected {client_id}. but on my client side (python-socketio client) it returns exceptions. OPEN Packet not returned by the server.
Read more >Troubleshooting connection issues | Socket.IO
First and foremost, please note that disconnections are common and expected, even on a stable Internet connection:
Read more >The Socket.IO Server — python-socketio documentation
To install the Socket.IO server along with its dependencies, use the following command: ... In that case instead of returning False socketio.exceptions.
Read more >socketio.exceptions.ConnectionError: OPEN packet not ...
socketio.exceptions.ConnectionError: OPEN packet not returned by server. 报错信息Exception in thread Thread-3:Traceback (most recent call last): ...
Read more >python socketio - open packet not returned by the server-django
Could anyone please help me explain why I got this exceptions? I have been doing what the docs said. score:0. client installed python-engineio-4.0 ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@Nathan1258 My Socket.IO server is written in JavaScript using socket.io v.2.3.0. To communicate with the server in Python, the right versions for python-socketio and python-engineio need to be chosen.
In my case, I forgot to fix the python-engineio version to 3.x, which resulted in the error. To fix it, I installed version 3.14.2.
did you pin the version of python-engineio to a compatible version? It should be a 3.x for you.