当前位置:网站首页>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-socketioWrote 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 :

边栏推荐
- Basic idea of counting and sorting
- Flex layout and usage
- 【ArcGIS教程】专题图制作-人口密度分布图——人口密度分析
- 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
- DFS和BFS概念及实践+acwing 842 排列数字(dfs) +acwing 844. 走迷宫(bfs)
- 装饰器基础学习02
- Analyse approfondie de kubebuilder
- In depth analysis of kubebuilder
- Chapter 9 Yunji datacanvas company has been ranked top 3 in China's machine learning platform market
- 5G VoNR+之IMS Data Channel概念
猜你喜欢

DFS and BFS concepts and practices +acwing 842 arranged numbers (DFS) +acwing 844 Maze walking (BFS)

AttributeError: module ‘torch._C‘ has no attribute ‘_cuda_setDevice‘

What about the collapse of win11 playing pubg? Solution to win11 Jedi survival crash

How to package the parsed Excel data into objects and write this object set into the database?

MySQL forgot how to change the password
![[Yugong series] go teaching course 005 variables in July 2022](/img/29/2bb30443e1e418556b5e08932f75b4.png)
[Yugong series] go teaching course 005 variables in July 2022

Common methods of list and map

深入解析Kubebuilder
![[hand torn STL] list](/img/aa/7060ab20b41936419041067cf9daed.jpg)
[hand torn STL] list

Chapter 9 Yunji datacanvas company has been ranked top 3 in China's machine learning platform market
随机推荐
未婚夫捐5亿美元给女PI,让她不用申请项目,招150位科学家,安心做科研!
Case reward: Intel brings many partners to promote the innovation and development of multi domain AI industry
Fiance donated 500million dollars to female PI, so that she didn't need to apply for projects, recruited 150 scientists, and did scientific research at ease!
Markdown编辑器
[line segment tree practice] recent requests + area and retrieval - array modifiable + my schedule I / III
一度辍学的数学差生,获得今年菲尔兹奖
《原动力 x 云原生正发声 降本增效大讲堂》第三讲——Kubernetes 集群利用率提升实践
File upload vulnerability summary
How to package the parsed Excel data into objects and write this object set into the database?
Lessons and thoughts of the first SQL injection
How does vscade use the built-in browser?
STM32F103ZE+SHT30检测环境温度与湿度(IIC模拟时序)
抖音或将推出独立种草社区平台:会不会成为第二个小红书
A picture to understand! Why did the school teach you coding but still not
组织实战攻防演练的5个阶段
指针与数组在函数中输入实现逆序输出
全国气象数据/降雨量分布数据/太阳辐射数据/NPP净初级生产力数据/植被覆盖度数据
Common Oracle SQL statements
You can't sell the used lithography machine to China! The United States unreasonably pressured the Dutch ASML, and domestic chips were suppressed again
Chapter 9 Yunji datacanvas company won the highest honor of the "fifth digital finance innovation competition"!