预期的块结束 YAML 错误 [英] Expected block end YAML error

查看:22
本文介绍了预期的块结束 YAML 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将此 YAML 文件粘贴到在线 yaml 解析器时,我收到了预期的块结束错误:

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:

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...'
              ^

推荐答案

ALREADYEXISTS开头的行使用'作为结束引号,应该是使用'.下一行(报告错误的地方)的开引号被视为结束引号,这种混淆导致了错误.

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.

这篇关于预期的块结束 YAML 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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