当前位置:网站首页>Sanic service startup failed
Sanic service startup failed
2022-06-25 00:58:00 【70% spicy】
establish sanic Service startup failed :
#!/usr/bin/env python
# -*- coding: utf-8 -*
''' @Project :Sanic01 @File :main.py @Author :Aron @Date :2022/6/21 14:38 '''
from sanic import Sanic
from sanic.response import json,json_dumps
app = Sanic(name='hello-example') # name Must start with a string , Can only contain numbers and letters 、_、-
@app.get('/')
async def test(request):
return json({
'hello':'world'
})
if __name__ == '__main__':
app.run(host='0.0.0.0',port=8000)
Sanic When starting the service , Terminal display :
"D:\Program File\Python\python.exe" "D:\Program File\PythoProfessional\PyCharm 2021.3\plugins\python\helpers\pycharm\_jb_pytest_runner.py" --target main.py::test
Testing started at 15:04 ...
Launching pytest with arguments main.py::test --no-header --no-summary -q in D:\Project\pythonProject\Sanic01\bin
============================= test session starts =============================
collecting ... collected 1 item
main.py::test SKIPPED (async def function and no async plugin instal...) [100%]
Skipped: async def function and no async plugin installed (see warnings)
======================== 1 skipped, 1 warning in 0.12s ========================
Process finished with exit code 0
because , Interface functions with test* start , As a test case , Change your name (eg. demo) It will start normally !
"D:\Program File\Python\python.exe" D:/Project/pythonProject/Sanic01/bin/main.py
[2022-06-21 15:10:46 +0800] [18760] [INFO] Sanic v22.3.2
[2022-06-21 15:10:46 +0800] [18760] [INFO] Goin' Fast @ http://0.0.0.0:8000
[2022-06-21 15:10:46 +0800] [18760] [INFO] mode: production, single worker
[2022-06-21 15:10:46 +0800] [18760] [INFO] server: sanic
[2022-06-21 15:10:46 +0800] [18760] [INFO] python: 3.9.0
[2022-06-21 15:10:46 +0800] [18760] [INFO] platform: Windows-10-10.0.19041-SP0
[2022-06-21 15:10:46 +0800] [18760] [INFO] packages: sanic-routing==22.3.0
[2022-06-21 15:10:46 +0800] [18760] [INFO] Starting worker [18760]
边栏推荐
- Use of file class filenamefilter & filefilter in io
- ros(24):error: invalid initialization of reference of type ‘xx’ from expression of type ‘xx’
- JS dynamically generates variable names and assigns values
- [micro service sentinel] real time monitoring | RT | throughput | concurrency | QPS
- 大厂高频软件测试面试题和答案都帮你准备好啦,备战金九银十
- Go crawler framework -colly actual combat (III) -- panoramic cartoon picture capture and download
- adb shell sendevent
- Xcode预览(Preview)显示List视图内容的一个Bug及解决
- 5-minute NLP: summary of 3 pre training libraries for rapid realization of NER
- The drawableleft of the custom textview in kotlin is displayed in the center together with the text
猜你喜欢

2019 summary and 2020 outlook

Mobile security tool jar

Usage of ViewModel and livedata in jetpack

Databinding quick start (still using findviewbyid?)
![[micro service sentinel] real time monitoring | RT | throughput | concurrency | QPS](/img/fc/6b36759570b9b1007d2640009576d9.png)
[micro service sentinel] real time monitoring | RT | throughput | concurrency | QPS
Modstart: embrace new technologies and take the lead in supporting laravel 9.0

【Redis实现秒杀业务③】超卖问题之乐观锁具体实现

How to quickly open traffic master for wechat applet

Use of navigation and navigationui

Custom animation (simulated win10 loading animation) - Optimization
随机推荐
Eliminate duplicate dependencies
A website for programmers with a monthly salary of 30K
Xcode preview displays a bug in the content of the list view and its solution
adb shell sendevent
[redis realizes seckill service ②] solution to oversold problem
通过kubernetes可视化界面(rancher)安装kibana
热力图展示相关矩阵
ros(24):error: invalid initialization of reference of type ‘xx’ from expression of type ‘xx’
百公里加速仅5.92秒,威兰达高性能版以高能产品实力领跑
Practical operation notes - notebook plus memory and ash cleaning
How to use promise Race() and promise any() ?
Custom animation (simulated win10 loading animation) - Optimization
C#和C 的CAN通信实验
[microservices sentinel] cluster link | microservices cluster environment construction
不重要的token可以提前停止计算!英伟达提出自适应token的高效视觉Transformer网络A-ViT,提高模型的吞吐量!...
Android SQLite database
QT(35)-操作EXCEL-QXlsx-QAxObject
【微服务|Sentinel】簇点链路|微服务集群环境搭建
2022年全国最新消防设施操作员(高级消防设施操作员)模拟题及答案
打卡smart精灵#1,品牌不缺吸引力,产品本身实力如何?