当前位置:网站首页>Flask项目使用flask-socketio异常:TypeError: function() argument 1 must be code, not str
Flask项目使用flask-socketio异常:TypeError: function() argument 1 must be code, not str
2022-07-06 22:22:00 【1024小神】
直接使用 pip 来安装:
pip install flask-socketio写了一个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)
结果报错:
TypeError: function() argument 1 must be code, not str
结果问题:
Confirmed working after upgrading Python package aiohttp from version 3.7.4 to 3.8.1.
确认用的aiohttp版本过低,是3.6.1的,所以升级了一下:
pip install --upgrade aiohttp
之后就可以正常启动了:

边栏推荐
- mpf2_线性规划_CAPM_sharpe_Arbitrage Pricin_Inversion Gauss Jordan_Statsmodel_Pulp_pLU_Cholesky_QR_Jacobi
- Meow, come, come: do you really know if, if else
- What about the collapse of win11 playing pubg? Solution to win11 Jedi survival crash
- 程序员上班摸鱼,这么玩才高端!
- Data security -- 12 -- Analysis of privacy protection
- Is there any way to bookmark the code in the visual studio project- Is there a way to bookmark code in a Visual Studio project?
- Introduction to the PureMVC series
- Lecture 3 of "prime mover x cloud native positive sounding, cost reduction and efficiency enhancement lecture" - kubernetes cluster utilization improvement practice
- JS form get form & get form elements
- Can I specify a path in an attribute to map a property in my class to a child property in my JSON?
猜你喜欢

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

Common methods of list and map
![[hand torn STL] list](/img/aa/7060ab20b41936419041067cf9daed.jpg)
[hand torn STL] list

Depth first traversal template principle of tree and graph

九章云极DataCanvas公司获评36氪「最受投资人关注的硬核科技企业」

JDBC link Oracle reference code

深入解析Kubebuilder

Intel and Xinbu technology jointly build a machine vision development kit to jointly promote the transformation of industrial intelligence

AI landing new question type RPA + AI =?

计数排序基础思路
随机推荐
B站大佬用我的世界搞出卷积神经网络,LeCun转发!爆肝6个月,播放破百万
R descriptive statistics and hypothesis testing
论文上岸攻略 | 如何快速入门学术论文写作
Both primary and secondary equipment numbers are 0
acwing 843. n-皇后问题
每人每年最高500万经费!选人不选项目,专注基础科研,科学家主导腾讯出资的「新基石」启动申报
JS also exports Excel
九章云极DataCanvas公司蝉联中国机器学习平台市场TOP 3
[line segment tree practice] recent requests + area and retrieval - array modifiable + my schedule I / III
The worse the AI performance, the higher the bonus? Doctor of New York University offered a reward for the task of making the big model perform poorly
【线段树实战】最近的请求次数 + 区域和检索 - 数组可修改+我的日程安排表Ⅰ/Ⅲ
Intel and Xinbu technology jointly build a machine vision development kit to jointly promote the transformation of industrial intelligence
AI landing new question type RPA + AI =?
How to package the parsed Excel data into objects and write this object set into the database?
Flex layout and usage
Intel David tuhy: the reason for the success of Intel aoten Technology
Digital chemical plant management system based on Virtual Simulation Technology
Two methods of chromosome coordinate sequencing
What if win11 pictures cannot be opened? Repair method of win11 unable to open pictures
Complimentary tickets quick grab | industry bigwigs talk about the quality and efficiency of software qecon conference is coming