Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error parsing yaml file: mapping values are not allowed here

I want to upload an app to Google App Engine:

I get this

Error parsing yaml file: mapping values are not allowed here   in "/home/antonio/Desktop/ATI/climate-change/app.yaml", line 2, column 8  

When running

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

with this app.yaml file:

application:climate-change version: 1 runtime: python27 api_version: 1 threadsafe: true  handlers: - url: /.*   script: helloworld.app 

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

like image 764
andandandand Avatar asked Jun 10 '12 19:06

andandandand


2 Answers

Change

application:climate-change 

to

application: climate-change 

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)

like image 138
Dave W. Smith Avatar answered Sep 19 '22 20:09

Dave W. Smith


Another cause is wrong indentation which means trying to create the wrong objects. I've just fixed one in a Kubernetes Ingress definition:

Wrong

- path: /      backend:        serviceName: <service_name>        servicePort: <port>  

Correct

- path: /   backend:     serviceName: <service_name>     servicePort: <port> 
like image 26
lcfd Avatar answered Sep 20 '22 20:09

lcfd