Search code examples
yaml

Expected block end YAML error


When pasting this YAML file into an online yaml parser, I got an expected block end error:

ADDATTEMPTING: 'Tentative d ajout '
ATTEMPTINGTOGIVE: 'Tenter de donner '
ATTEMPTINGTOSET1: 'Tentative de définition '
ATTEMPTINGTOSET2: ' avec '
ALREADYEXISTS: 'Erreur. Package existe déjà’
CANCEL1: 'Annulation...'
(...)

Error

ERROR:

while parsing a block mapping
  in "<unicode string>", line 1, column 1:
    ADDATTEMPTING: 'Tentative d ajout '
    ^
expected <block end>, but found '<scalar>'
  in "<unicode string>", line 6, column 11:
    CANCEL1: 'Annulation...'
              ^

Solution

  • The line starting ALREADYEXISTS uses as the closing quote, it should be using '. The open quote on the next line (where the error is reported) is seen as the closing quote, and this mix up is causing the error.