Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by test test
at 2024-09-29 00:25:49
Point:500 Replies:2 POST_ID:829284USER_ID:12424
Topic:
python#javascript
it works before for both sides secoket.io connection, Suddenly today
When I connect to my socketio python server today, the javascript error is"has been blocked by CORS policy: No 'Access-Control-Allow-Origin"
and at service-side, it shown
"The client is using an unsupported version of the Socket.IO or Engine.IO protocols Error",
on python code, I have already put
Python server code:
----------------------------------
from flask import Flask, render_template, request,Response, session, jsonify
from flask_cors import CORS
app = Flask(__name__)
CORS(app)
socketio = SocketIO(app,cors_allowed_origins='*')
Please advise
Expert: Wilson Edwards replied at 2025-02-08 20:11:27
also check all package version by python3 -m pip list
if u get error:
66.90.23.28 - - [29/Sep/2024 20:00:31] "GET /socket.io/?EIO=3&transport=polling&t=PJbRigA HTTP/1.1" 400 -
reinstall package.....
python3 -m pip install python-engineio==3.13.2 &python39 -m pip install python-engineio==4.6.0
Accepted Solution
Author: test test replied at 2024-09-29 00:29:01
500 points Excellent
if it worked B4, seems system setting on python3 issue...Try to reinstall those modules related socket.io by pip3 uninstall, then reinstall, you could check your requirement.txt file for thise one you work before, and check it by pip3 list
The link may help