Replies: 2 comments
-
Can you post the code of the Python client? It may be that the error is
arising there
On Thu, 23 Dec 2021 at 06:01, AnanyaCS ***@***.***> wrote:
1.I have a flask_socketio app which is deployed on heroku. the flask app
shows an index.html page when you call the url.
Config for flask app
Flask==2.0.2
gunicorn==20.1.0
eventlet==0.30.2
gevent-websocket==0.10.1
Flask-SocketIO==4.3.1
python-engineio==3.13.2
python-socketio==4.6.0
from flask import Flask, render_template, make_response, redirect
from flask_socketio import SocketIO, send, emit
import os
These are the imports in the flask server
When i access this server deployed to heroku using a html+js app I can
access it using cdn in script tag(from any html page basically)
But when i access it from python program I get unexpected response error.
Providing full stacktrace here:
Attempting polling connection to
https://my-server-raspi.herokuapp.com/socket.io/?transport=polling&EIO=4
Traceback (most recent call last):
File "/home/pi/Desktop/test-project/client.py", line 4, in
sio.connect('https://my-server-raspi.herokuapp.com/')
File "/home/pi/.local/lib/python3.9/site-packages/socketio/client.py",
line 282, in connect
six.raise_from(exceptions.ConnectionError(exc.args[0]), None)
File "", line 3, in raise_from
socketio.exceptions.ConnectionError: Unexpected response from server
edit: I had posted it on repo accidentally and miguel suggested keeping
the version of python-socketio same but that didnt help as server uses
flask_socketio and not python_socketio
*Server*: flask_socketio
*Client*: python_socketio
—
Reply to this email directly, view it on GitHub
<#836>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHVT3QZ5BH6GINYBSZRRZC3USK3LPANCNFSM5KUBMFQQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
…____________________
Ben Dyer
t: 07788 871 719
e: ***@***.***
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Make sure you use the same version of python-socketio and python-engineio in the client and server. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
1.I have a flask_socketio app which is deployed on heroku. the flask app shows an index.html page when you call the url.
Config for flask app
Flask==2.0.2
gunicorn==20.1.0
eventlet==0.30.2
gevent-websocket==0.10.1
Flask-SocketIO==4.3.1
python-engineio==3.13.2
python-socketio==4.6.0
from flask import Flask, render_template, make_response, redirect
from flask_socketio import SocketIO, send, emit
import os
These are the imports in the flask server
When i access this server deployed to heroku using a html+js app I can access it using cdn in script tag(from any html page basically)
But when i access it from python program I get unexpected response error. Providing full stacktrace here:
Attempting polling connection to https://my-server-raspi.herokuapp.com/socket.io/?transport=polling&EIO=4
Traceback (most recent call last):
File "/home/pi/Desktop/test-project/client.py", line 4, in
sio.connect('https://my-server-raspi.herokuapp.com/')
File "/home/pi/.local/lib/python3.9/site-packages/socketio/client.py", line 282, in connect
six.raise_from(exceptions.ConnectionError(exc.args[0]), None)
File "", line 3, in raise_from
socketio.exceptions.ConnectionError: Unexpected response from server
edit: I had posted it on repo accidentally and miguel suggested keeping the version of python-socketio same but that didnt help as server uses flask_socketio and not python_socketio
Server: flask_socketio
Client: python_socketio
Beta Was this translation helpful? Give feedback.
All reactions