Closed shoucandanghehe closed 1 year ago
上游问题,随机触发,忽略即可
nbcli也是运行的python bot.py
没区别
上游问题
猜到了(
或许可以创建一个label upstream issues
随机触发,忽略即可
不过触发概率我这边测是10/10(
你可以试试启动nb然后啥也别连,等两三秒,再ctrl c
你可以试试启动nb然后啥也别连,等两三秒,再ctrl c
02-02 11:20:58 [INFO] logging | Started server process [31856]
02-02 11:20:58 [INFO] logging | Waiting for application startup.
02-02 11:20:58 [INFO] logging | Application startup complete.
02-02 11:20:58 [INFO] logging | Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
02-02 11:22:46 [INFO] logging | Shutting down
02-02 11:22:46 [INFO] logging | Finished server process [31856]
02-02 11:22:46 [ERROR] logging | Traceback (most recent call last):
File "venv\path\Lib\site-packages\starlette\routing.py", line 674, in lifespan
await receive()
File "venv\path\Lib\site-packages\uvicorn\lifespan\on.py", line 137, in receive
return await self.receive_queue.get()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\asyncio\queues.py", line 158, in get
await getter
asyncio.exceptions.CancelledError
🤔
这问题uvicorn和starlette都得背一点锅,uvicorn在Windows上的处理到现在没修,starlette把CancelledError给捕获了
在
Windows
平台上使用nb-cli运行bot,并且设置FASTAPI_RELOAD=false
时,Ctrl-C退出bot报错:使用
python bot.py
运行正常环境:
使用pipx安装