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

边栏推荐
- 树与图的深度优先遍历模版原理
- MySQL数据库(基础篇)
- AI landing new question type RPA + AI =?
- 一图看懂!为什么学校教了你Coding但还是不会的原因...
- Thesis landing strategy | how to get started quickly in academic thesis writing
- jvm是什么?jvm调优有哪些目的?
- leetcode 53. Maximum Subarray 最大子数组和(中等)
- Intel David tuhy: the reason for the success of Intel aoten Technology
- What about the collapse of win11 playing pubg? Solution to win11 Jedi survival crash
- STM32F103实现IAP在线升级应用程序
猜你喜欢

【愚公系列】2022年7月 Go教学课程 005-变量

Programmers go to work fishing, so play high-end!

JS variable plus

树与图的深度优先遍历模版原理

AI landing new question type RPA + AI =?

Meow, come, come: do you really know if, if else
![[line segment tree practice] recent requests + area and retrieval - array modifiable + my schedule I / III](/img/13/d598bb53b71fbadd4a97c603152124.png)
[line segment tree practice] recent requests + area and retrieval - array modifiable + my schedule I / III

指针与数组在函数中输入实现逆序输出

九章云极DataCanvas公司摘获「第五届数字金融创新大赛」最高荣誉!

深入解析Kubebuilder
随机推荐
[hand torn STL] list
架构实战训练营|课后作业|模块 6
一度辍学的数学差生,获得今年菲尔兹奖
STM32封装ESP8266一键配置函数:实现实现AP模式和STA模式切换、服务器与客户端创建
JS variable plus
DFS和BFS概念及实践+acwing 842 排列数字(dfs) +acwing 844. 走迷宫(bfs)
leetcode 53. Maximum Subarray 最大子数组和(中等)
Vscode 如何使用内置浏览器?
Introduction to namespace Basics
Chapter 9 Yunji datacanvas company has been ranked top 3 in China's machine learning platform market
[practice leads to truth] is the introduction of import and require really the same as what is said on the Internet
PLC模拟量输出 模拟量输出FB analog2NDA(三菱FX3U)
Monitoring cannot be started after Oracle modifies the computer name
Read of shell internal value command
过气光刻机也不能卖给中国!美国无理施压荷兰ASML,国产芯片再遭打压
AttributeError: module ‘torch._C‘ has no attribute ‘_cuda_setDevice‘
Tree map: tree view - draw covid-19 array diagram
Complimentary tickets quick grab | industry bigwigs talk about the quality and efficiency of software qecon conference is coming
Acl2022 | decomposed meta learning small sample named entity recognition
Markdown编辑器