当前位置:网站首页>Flask project uses flask socketio exception: typeerror: function() argument 1 must be code, not str
Flask project uses flask socketio exception: typeerror: function() argument 1 must be code, not str
2022-07-07 04:55:00 【1024 little god】
Use it directly pip To install :
pip install flask-socketio
Wrote a Demo:
from flask import Flask, render_template
from flask_socketio import SocketIO
app = Flask(__name__)
app.config['SECRET_KEY'] = 'secret!'
socketio = SocketIO(app)
if __name__ == '__main__':
socketio.run(app, host='0.0.0.0', debug=True)
The result is wrong :
TypeError: function() argument 1 must be code, not str
As a result, the problem :
Confirmed working after upgrading Python package aiohttp from version 3.7.4 to 3.8.1.
For confirmation aiohttp Version is too low , yes 3.6.1 Of , So I upgraded :
pip install --upgrade aiohttp
Then it can be started normally :
边栏推荐
- Master the secrets of software security testing methods, and pinch the security test report with your hands
- sscanf,sscanf_ S and its related usage "suggested collection"
- Web3 社区中使用的术语
- Gavin teacher's perception of transformer live class - rasa project actual combat e-commerce retail customer service intelligent business dialogue robot microservice code analysis and dialogue experim
- This "advanced" technology design 15 years ago makes CPU shine in AI reasoning
- AI表现越差,获得奖金越高?纽约大学博士拿出百万重金,悬赏让大模型表现差劲的任务
- 未婚夫捐5亿美元给女PI,让她不用申请项目,招150位科学家,安心做科研!
- On the 110th anniversary of Turing's birth, has the prediction of intelligent machine come true?
- 【736. Lisp 语法解析】
- [line segment tree practice] recent requests + area and retrieval - array modifiable + my schedule I / III
猜你喜欢
Markdown编辑器
DFS and BFS concepts and practices +acwing 842 arranged numbers (DFS) +acwing 844 Maze walking (BFS)
JDBC link Oracle reference code
Vscode 如何使用内置浏览器?
指针与数组在函数中输入实现逆序输出
Section 1: (3) logic chip process substrate selection
01机器学习相关规定
R language principal component PCA, factor analysis, clustering analysis of regional economy analysis of Chongqing Economic Indicators
[hand torn STL] list
深入解析Kubebuilder
随机推荐
What if the win11 screenshot key cannot be used? Solution to the failure of win11 screenshot key
Oracle - views and sequences
STM32F103实现IAP在线升级应用程序
Break the memory wall with CPU scheme? Learn from PayPal to expand the capacity of aoteng, and the volume of missed fraud transactions can be reduced to 1/30
3GPP信道模型路损基础知识
计数排序基础思路
Jetson nano配置pytorch深度学习环境//待完善
AI表现越差,获得奖金越高?纽约大学博士拿出百万重金,悬赏让大模型表现差劲的任务
Gpt-3 is a peer review online when it has been submitted for its own research
Canteen user dish relationship system (C language course design)
日常工作中程序员最讨厌哪些工作事项?
mpf2_线性规划_CAPM_sharpe_Arbitrage Pricin_Inversion Gauss Jordan_Statsmodel_Pulp_pLU_Cholesky_QR_Jacobi
Programmers go to work fishing, so play high-end!
Meow, come, come: do you really know if, if else
What if win11 pictures cannot be opened? Repair method of win11 unable to open pictures
Appium practice | make the test faster, more stable and more reliable (I): slice test
【736. Lisp 语法解析】
Time complexity & space complexity
【數模】Matlab allcycles()函數的源代碼(2021a之前版本沒有)
JS variable plus