Why doesn't initial-data.yml display values ​​for email?

I am creating an intial-data.yml file to test my game! application, but when I try to load the page, I get an error when it reads the intial-data.yml . It seems that he is able to analyze the fields of username, first name and last name, but when he gets to the email, he gives the following error:

 play.exceptions.YAMLException: null; mapping values are not allowed here (in file /conf/initial-data.yml line 7, column 11) at play.test.Fixtures.loadModels(Fixtures.java:234) at Bootstrap.doJob(Bootstrap.java:12) at play.jobs.Job.doJobWithResult(Job.java:50) at play.jobs.Job.call(Job.java:146) at Invocation.Job(Play!) Caused by: mapping values are not allowed here in "<reader>", line 7, column 11: email: myemail@gmail.com ^ 

The first entry in my YML file is as follows:

 # Test data User(Dan): username: Username1 fname: John lname: Doe email: myemail@gmail.com password: password1 

Does anyone know why this is happening?

+4
source share
1 answer

It works fine if you align the columns ( email and password have an extra 1-bit indent in your example):

 # Test data User(Dan): username: Username1 fname: John lname: Doe email: myemail@gmail.com password: password1 

This online parser is useful for debugging ...

+6
source

Source: https://habr.com/ru/post/1397238/


All Articles