python 读取yaml 文件 引起报错: TypeError: string indices must be integers

File "e:/CodeFiles/saucedemo/Common/parse_yaml.py", line 6, in parse_yaml return datas[section][key] TypeError: string indices must be integers
导致原因:yaml文件格式不规范,冒号后面要有空格,粗心忘记了。加上之后读取成功。

posted @ 2022-07-06 13:29  深海鱼香茄子  阅读(497)  评论(0编辑  收藏  举报