Expected block end YAML error

后端 未结 6 851

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

ADDATTEMPTING: \'Tentative d ajout \'
ATTEMPTINGTOGIVE: \'Tenter de do         


        
6条回答
  •  终归单人心
    2021-02-05 02:09

    In my case, the error occured when I tried to pass a variable which was looking like a bytes-object (b"xxxx") but was actually a string.

    You can convert the string to a real bytes object like this:

    foo.strip('b"').replace("\\n", "\n").encode()
    

提交回复
热议问题