CMHopeSunshine / nonebot-plugin-learning-chat

Nonebot2插件,让Bot学习群友的发言和表情包。/ Nonebot2 plugin to learn what your group members say.
GNU Affero General Public License v3.0
165 stars 6 forks source link

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

Open ganchengcaiyue opened 7 months ago

ganchengcaiyue commented 7 months ago

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 commented 7 months ago

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

CMHopeSunshine commented 7 months ago

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 commented 7 months ago

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

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