为了账号安全,请及时绑定邮箱和手机立即绑定

报错了,starlette.routing.NoMatchFound: No route exists for name "static" and params "path".

报错了,starlette.routing.NoMatchFound: No route exists for name "static" and params "path".



http://img1.sycdn.imooc.com//63bad84200013e3315450773.jpg


http://img1.sycdn.imooc.com//63bad85d0001d1be15450773.jpg

正在回答

2 回答

需要在run.py文件中添加这行命令且就可以运行成功了
app.mount(path='/static', app=StaticFiles(directory="./coronavirus/static"), name='static')


0 回复 有任何疑惑可以回复我~

同问,我也遇到这个问题

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
高性能 FastAPI 框架入门精讲
  • 参与学习       13934    人
  • 解答问题       92    个

FastAPI 框架快速上手开发,结合 API 交互文档逐个讲解核心模块的使用。

进入课程

报错了,starlette.routing.NoMatchFound: No route exists for name "static" and params "path".

我要回答 关注问题
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号