解析 yaml 文件时出错:此处不允许映射值 [英] Error parsing yaml file: mapping values are not allowed here

查看:17
本文介绍了解析 yaml 文件时出错:此处不允许映射值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将应用上传到 Google App Engine:

I want to upload an app to 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 

运行时

./appcfg.py update /home/antonio/Desktop/ATI/climate-change

使用此 app.yaml 文件:

with this app.yaml file:

application:climate-change
version: 1
runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /.*
  script: helloworld.app

第 2 行,第 8 列对应于版本行.这里有什么问题?顺便说一句,我在这里使用的是 Ubuntu 12.04.

line 2, column 8 corresponds to the version line. What is wrong here? Btw, I'm using Ubuntu 12.04 here.

推荐答案

改变

application:climate-change

application: climate-change

如果你想要一个键值对,冒号后面的空格在 yaml 中是强制性的.(参见 http://www.yaml.org/spec/1.2/spec.html#id2759963)

The space after the colon is mandatory in yaml if you want a key-value pair. (See http://www.yaml.org/spec/1.2/spec.html#id2759963)

这篇关于解析 yaml 文件时出错:此处不允许映射值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆