Tuesday 5 December 2017

yaml - ScannerError: mapping values are not allowed here

At the root of your YAML document you have a mapping with
key test_name and as value the start of a plain scalar
tavern .....



The
parser expects a key, with the same indent as the first line, on the second line or a
continuation of your plain scalar from the first line. The second line is empty, so it
continues with the same expectations on the third line. There it finds an
- which is further indented than the beginning of
test_name, so it is not a key, but part of the plain scalar.
Then it finds name also part of a the plain scalar started on
the first line and then : (colon +
space).



But that colon+space is not allowed in
plain scalar, as that gives potential ambiguity with the start of another key-value
pair.




The unlikely solution is that
you put double quotes before tavern and at the end of the YAML
document.



More likely you should include a key
for which the structure starting with - name: list this is the
value. E.g.:



test_name: tavern
poc

stages:
- name: list

request:



(as
from the second entry you get from googling "tavern yaml")

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...