jjzjj

ComposerError

全部标签

python - 使用 Python 读取 YAML 文件会导致 yaml.composer.ComposerError : expected a single document in the stream

我有一个看起来像这样的yaml文件---level_1:"test"level_2:'NetApp,SOFS,ZFSCreation'request:341570---level_1:"test"level_2:'NetApp,SOFS,ZFSCreation'request:341569---level_1:"test"level_2:'NetApp,SOFS,ZFSCreation'request:341568我能够在使用YAML的Perl中正确读取此内容,但在使用YAML的python中无法正确读取。它失败并出现错误:expectedasingledocumentinthestr

python - 使用 Python 读取 YAML 文件会导致 yaml.composer.ComposerError : expected a single document in the stream

我有一个看起来像这样的yaml文件---level_1:"test"level_2:'NetApp,SOFS,ZFSCreation'request:341570---level_1:"test"level_2:'NetApp,SOFS,ZFSCreation'request:341569---level_1:"test"level_2:'NetApp,SOFS,ZFSCreation'request:341568我能够在使用YAML的Perl中正确读取此内容,但在使用YAML的python中无法正确读取。它失败并出现错误:expectedasingledocumentinthestr