SonderXiaoming / huannai_plugin_fortune

MIT License
10 stars 3 forks source link

无法启动 #11

Closed yikaa closed 1 year ago

yikaa commented 1 year ago

pydantic.errors.PydanticUserError: A non-annotated attribute was detected: fortune_path = WindowsPath('C:/新建文件夹/HoshinoBot-master/hoshino/modules/huannai_plugin_fortune/resource'). All model fields require a type annotation; if fortune_path is not meant to be a field, you may be able to resolve this error by annotating it as a ClassVar or updating model_config['ignored_types'].

ERROR: Failed to import "hoshino.modules.huannai_plugin_fortune.config", error: A non-annotated attribute was detected: fortune_path = WindowsPath('C:/新建文件夹/HoshinoBot-master/hoshino/modules/huannai_plugin_fortune/resource'). All model fields require a type annotation; if fortune_path is not meant to be a field, you may be able to resolve this error by annotating it as a ClassVar or updating model_config['ignored_types']. 具体报错信息,是不是需要注释什么?

SonderXiaoming commented 1 year ago

fortune_path 前面加":Path"

yikaa commented 1 year ago

图片 有另外的错误了

SonderXiaoming commented 1 year ago

9

yikaa commented 1 year ago

好的感谢,已解决