AttributeError:模块“yaml”没有“FullLoader”属性如何解决

2024-10-02 18:17:31 发布

您现在位置:Python中文网/ 问答频道 /正文

我的代码非常简单

import yaml
with open(r'C:\Users\data\insolvere.yaml') as file:
insolve = yaml.load(file, Loader=yaml.FullLoader)

print(insolve)

我得到了标题中提到的错误:AttributeError: module 'yaml' has no attribute 'FullLoader'


Tags: 代码importyamldataaswithloadloader