小编Mer*_*ook的帖子

如何修复 yaml 文件中的“此上下文中不允许映射值”错误?

我浏览过类似的问题,并相信我已经应用了我能够从答案中收集到的所有内容。

我有一个 .yml 文件,据我所知,每个元素的格式都相同。然而根据YamlLint.com

(<unknown>): mapping values are not allowed in this context at line 119 column 16

在这种情况下,第 119 行是包含第二个实例的行,下面的单词“transitions”。我可以告诉每个元素的格式相同。我在这里错过了什么吗?

  landingPage:
    include: false
    transitions:
      -
        condition:location
        nextState:location

  location:
    include:false
    transitions:
      -
        condition:excluded
        nextState:excluded

  excluded:
    include:false
    transitions:
      -
        condition:excluded
        nextState: excluded
      -
        condition:age
        nextState:age

Run Code Online (Sandbox Code Playgroud)

yaml web-scraping

25
推荐指数
4
解决办法
8万
查看次数

标签 统计

web-scraping ×1

yaml ×1