nonebot-plugin-mcqq icon indicating copy to clipboard operation
nonebot-plugin-mcqq copied to clipboard

【错误反馈】server_dict传入时报类型错误

Open p0rt39 opened this issue 1 year ago • 1 comments

运行环境

Winserver2022 22H2, Python 3.12, Mohist 1.20.1

NB插件及版本号

2.5.6

MC插件及版本号

2.6.6 Spigot

错误描述

在加载插件时报 pydantic.error_wrappers.ValidationError: 1 validation error for ParsingModel[Config] root -> mc_qq -> server_dict value is not a valid dict (type=type_error.dict) 使用wiki中的模板和自编辑传入参数mc_qq__server_dict均会报错 使用的pydantic是经过降级的1.10.8版本

报错日志(如果有)

No response

p0rt39 avatar May 11 '24 18:05 p0rt39

填写的dict是否携带了注释?删除注释以符合Json标准 适配器可能对pydantic V1支持不太完善,如无需求可以升级至V2

"Server": { # 服务器名,与 mc 端配置文件同步

改为

"Server": {

17TheWord avatar May 12 '24 03:05 17TheWord

长时间没有回应,将关闭issue,若扔有问题请再次打开

17TheWord avatar May 26 '24 10:05 17TheWord