and*_*and 65 google-app-engine
我想将应用上传到Google App Engine:
我明白了
Error parsing yaml file:
mapping values are not allowed here
in "/home/antonio/Desktop/ATI/climate-change/app.yaml", line 2, column 8
Run Code Online (Sandbox Code Playgroud)
跑步时
./appcfg.py update /home/antonio/Desktop/ATI/climate-change
Run Code Online (Sandbox Code Playgroud)
使用此app.yaml文件:
application:climate-change
version: 1
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: helloworld.app
Run Code Online (Sandbox Code Playgroud)
第2行,第8列对应于版本行.这有什么不对?顺便说一句,我在这里使用的是Ubuntu 12.04.
Dav*_*ith 86
更改
application:climate-change
Run Code Online (Sandbox Code Playgroud)
至
application: climate-change
Run Code Online (Sandbox Code Playgroud)
结肠后的空格是yaml中必需的.(见http://www.yaml.org/spec/1.2/spec.html#id2759963)
lcf*_*cfd 53
另一个原因是错误的缩进,这意味着尝试创建错误的对象.我刚刚在Kubernetes Ingress定义中修复了一个:
错误
- path: /
backend:
serviceName: <service_name>
servicePort: <port>
Run Code Online (Sandbox Code Playgroud)
正确
- path: /
backend:
serviceName: <service_name>
servicePort: <port>
Run Code Online (Sandbox Code Playgroud)
我在乔的回答中提到的类似情况下看到了这个错误:
description: Too high 5xx responses rate: {{ .Value }} > 0.05
Run Code Online (Sandbox Code Playgroud)
我们在描述值中有一个冒号。因此,问题在于描述值周围缺少引号。可以通过添加引号来解决:
description: 'Too high 5xx responses rate: {{ .Value }} > 0.05'
Run Code Online (Sandbox Code Playgroud)
或者,如果间隔不是问题,则可能需要父目录名而不是文件名.
不$ dev_appserver helloapp.py
但是$ dev_appserver hello/
例如:
Johns-Mac:hello john$ dev_appserver.py helloworld.py
Traceback (most recent call last):
File "/usr/local/bin/dev_appserver.py", line 82, in <module>
_run_file(__file__, globals())
...
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/yaml_listener.py", line 212, in _GenerateEventParameters
raise yaml_errors.EventListenerYAMLError(e)
google.appengine.api.yaml_errors.EventListenerYAMLError: mapping values are not allowed here
in "helloworld.py", line 3, column 39
Run Code Online (Sandbox Code Playgroud)
与
Johns-Mac:hello john$ cd ..
Johns-Mac:fbm john$ dev_appserver.py hello/
INFO 2014-09-15 11:44:27,828 api_server.py:171] Starting API server at: http://localhost:61049
INFO 2014-09-15 11:44:27,831 dispatcher.py:183] Starting module "default" running at: http://localhost:8080
Run Code Online (Sandbox Code Playgroud)
也许这会对其他人有所帮助,但是当映射的 RHS 包含冒号而不包含引号时,我看到了此错误,例如:
someKey:另一个关键:今天要做的改变:多锻炼
应该
someKey:另一个键:“今天要做的改变:多锻炼”
小智 5
错误:
people:
empId: 123
empName: John
empDept: IT
Run Code Online (Sandbox Code Playgroud)
正确的:
people:
emp:
id: 123
name: John
dept: IT
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
130787 次 |
最近记录: |