fastapi:“GET /docs HTTP/1.1”404 未找到

问题描述 投票:0回答:1

我最近将 fast api 从 v0.89.1 更新到 v0.110.0,并且收到以下错误。

“GET /docs HTTP/1.1”404 未找到

没有其他错误可以帮助我调试问题。

INFO:     Uvicorn running on http://0.0.0.0:portNumber (Press CTRL+C to quit)
INFO:     Started reloader process [xxxxx] using StatReload
INFO:     Started server process [xxxxx]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     - "GET / HTTP/1.1" 404 Not Found
INFO:     - "GET /docs HTTP/1.1" 404 Not Found

升级前一切正常。

python python-3.x fastapi openapi
1个回答
0
投票

删除

root_path="/"
解决了问题

© www.soinside.com 2019 - 2024. All rights reserved.