yaml_error上的Google App Engine错误

时间:2015-07-01 12:25:55

标签: python google-app-engine google-app-engine-python

当我尝试从终端在Google App引擎中运行helloworld.py脚本时,会出现屏幕截图中显示的错误。   #My操作系统:Ubuntu.14。# enter image description here

这是我的文件 app.yaml。

application: #My project Id.
version: 1
runtime: python27
threadsafe: true
api_version: 1 

handlers: 
- url: /static
  static_dir: static
- url: /
  static_files: static/index.html
  upload: static/index\.html
  secure: always 
- url: /_ah/spi/.*
  script: helloworld_api.app
libraries:

- name: endpoints
  version: 1.0

问题在于我无法在本地计算机上部署我的代码。   任何帮助都会得到感谢。谢谢:) 我检查了在线Yaml解析器,它也显示了它的有效性。

1 个答案:

答案 0 :(得分:0)

您错过了行,端点库实际上被解释为处理程序列表的一部分,这是不正确的。

应该是这样的:

...
- url: /_ah/spi/.*
  script: helloworld_api.app

libraries:
- name: endpoints
  version: 1.0