Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: "load()" has been removed, use #57

Open
ganchengcaiyue opened this issue Apr 20, 2024 · 3 comments
Open

AttributeError: "load()" has been removed, use #57

ganchengcaiyue opened this issue Apr 20, 2024 · 3 comments

Comments

@ganchengcaiyue
Copy link

image

AttributeError:
"load()" has been removed, use

yaml = YAML(typ='rt')
yaml.load(...)

and register any classes that you use, or check the tag attribute on the loaded data,
instead of file "E:\Bot\AS\LNTQQ\ganchengmoli\ganchengmoli\plugins\nonebot_plugin_learning_chat\config.py", line 78

            yaml.load(
@ganchengcaiyue
Copy link
Author

image
在云服务器上变成了
pydantic.error_wrappers.ValidationError: 1 validation error for ChatConfig
root
ChatConfig expected dict not str (type=type_error)

@CMHopeSunshine
Copy link
Owner

image

AttributeError: "load()" has been removed, use

yaml = YAML(typ='rt') yaml.load(...)

and register any classes that you use, or check the tag attribute on the loaded data, instead of file "E:\Bot\AS\LNTQQ\ganchengmoli\ganchengmoli\plugins\nonebot_plugin_learning_chat\config.py", line 78

            yaml.load(

把ruamel.yaml的版本先降级到0.17.21吧

@CMHopeSunshine
Copy link
Owner

image 在云服务器上变成了 pydantic.error_wrappers.ValidationError: 1 validation error for ChatConfig root ChatConfig expected dict not str (type=type_error)

这个是配置文件出问题了,您打开看看内容是否正常

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants