google-app-engine - Google App Engine dispatch.yaml 意外属性“服务”
问题描述
我无法让我的 dispatch.yaml 文件在本地 devappserver 上运行。我有两个错误,一个似乎与缩进有关,
expecting <block end>, but found ?
我可以通过删除如下所示的调度文件中的缩进来解决这个问题。
第二个问题发生在我删除了我得到的缩进我Unexpected attribute 'service' of type DispachInfoExternal
尝试从谷歌文档中复制示例但我得到了同样的错误,我也尝试将名称服务更改为模块,因为我相信这是旧名称,我得到了同样的错误。我使用 Atom 作为我的编辑器。
dispatch:
- url: '*/content/*'
service: default
- url: '*/admin/*'
service: admin-services
- url: '*/creator/*'
service: creator-services
- url: '*/social/*'
service: social-services
- url: '*/subs/*'
service: subscription-services
- url: '*/user/*'
service: user-services
解决方案
您缺少yaml 文件中的缩进。
写的不一样
dispatch:
- url: '*/content/*'
service: default
比
dispatch:
- url: '*/content/*'
service: default
推荐阅读
- python - Pandas/Python:使用 .replace() 从另一列值替换列值
- android - Touch event.getAction 在android studio中的服务类下不起作用
- python - 如何将 pygame.image.save 输出到变量而不是文件?
- python - REST API 忽略 Firebase 存储规则
- ios - 如何使用 Alamofire 关闭证书验证?
- python - PyQt5 - setStyleSheet 透明/alpha 不起作用?
- c# - 在 EF Core 中使用不同的名称指定关系
- python - Python多处理中的变量不会改变
- node.js - 错误:下载失败:服务器在 puppeteer 安装中返回代码 403
- javascript - 如何选择css变量并将样式值分配给另一个元素