当前位置:网站首页>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 :
边栏推荐
- Station B boss used my world to create convolutional neural network, Lecun forwarding! Burst the liver for 6 months, playing more than one million
- 5G VoNR+之IMS Data Channel概念
- JS also exports Excel
- A picture to understand! Why did the school teach you coding but still not
- Thesis landing strategy | how to get started quickly in academic thesis writing
- A series of shortcut keys for jetbrain pychar
- Two divs are on the same line, and the two divs do not wrap "recommended collection"
- 日常工作中程序员最讨厌哪些工作事项?
- Have you got the same "artifact" of cross architecture development praised by various industry leaders?
- DFS和BFS概念及实践+acwing 842 排列数字(dfs) +acwing 844. 走迷宫(bfs)
猜你喜欢
Time complexity & space complexity
System framework of PureMVC
装饰器基础学习02
A simple and beautiful regression table is produced in one line of code~
Win11 control panel shortcut key win11 multiple methods to open the control panel
How to package the parsed Excel data into objects and write this object set into the database?
Chapter 9 Yunji datacanvas was rated as 36 krypton "the hard core technology enterprise most concerned by investors"
C语言中函数指针与指针函数
Meow, come, come: do you really know if, if else
Chapter 9 Yunji datacanvas company has been ranked top 3 in China's machine learning platform market
随机推荐
Thread和Runnable创建线程的方式对比
【Android Kotlin协程】利用CoroutineContext实现网络请求失败后重试逻辑
Some understandings about 01 backpacker
What about the collapse of win11 playing pubg? Solution to win11 Jedi survival crash
全国气象数据/降雨量分布数据/太阳辐射数据/NPP净初级生产力数据/植被覆盖度数据
Programmers go to work fishing, so play high-end!
Tree map: tree view - draw covid-19 array diagram
Common methods of list and map
Gpt-3 is a peer review online when it has been submitted for its own research
STM32F103实现IAP在线升级应用程序
JS variable
How to package the parsed Excel data into objects and write this object set into the database?
File upload vulnerability summary
AI表现越差,获得奖金越高?纽约大学博士拿出百万重金,悬赏让大模型表现差劲的任务
为什么很多人对技术债务产生误解
指针与数组在函数中输入实现逆序输出
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
Organize five stages of actual attack and defense drill
B站大佬用我的世界搞出卷积神经网络,LeCun转发!爆肝6个月,播放破百万
In depth analysis of kubebuilder