Closed yuanzhidao closed 3 years ago
且其他插件都无法使用了
在群内不是管理员或群主
在.env配置文件中更改
member为群友,admin为管理员,owner为群主
或者更改superusers
,添加你的QQ号作为超级管理员
另外请使用1.0.1版本,修复了一个数据类型bug
上一个版本好像添加superusers没有效果 新版本好了
py", line 126, in _check_matcher await _run_matcher(Matcher, bot, event, state)
File "/usr/local/lib/python3.9/site-packages/nonebot/message.py", line 154, in _run_matcher await matcher.run(bot, event, state) File "/usr/local/lib/python3.9/site-packages/nonebot/matcher.py", line 584, in run await handler(self, bot, event, self.state) File "/usr/local/lib/python3.9/site-packages/nonebot/handler.py", line 81, in call await self.func( File "/usr/local/lib/python3.9/site-packages/nonebot-plugin-ncm/init.py", line 55, in message_receive _reply = event.dict()["reply"] File "pydantic/main.py", line 510, in pydantic.main.BaseModel.dict return dict( File "pydantic/main.py", line 875, in _iter v = self._get_value( File "pydantic/main.py", line 816, in pydantic.main.BaseModel._get_value return v.class(*seq_args) if is_namedtuple(v.class) else v.class(seq_args) File "/usr/local/lib/python3.9/site-packages/nonebot/adapters/_base.py", line 330, in init self.extend(self._construct(message)) File "/usr/local/lib/python3.9/site-packages/nonebot/adapters/_base.py", line 400, in extend for segment in obj: File "/usr/local/lib/python3.9/site-packages/nonebot/adapters/cqhttp/message.py", line 265, in _construct yield MessageSegment(seg["type"], seg.get("data") or {}) File "/usr/local/lib/python3.9/site-packages/nonebot/adapters/_base.py", line 278, in getitem return self.data[key] KeyError: 'type'
新版不提醒没有权限 但是后台依旧报错
具体是干什么的时候报错的。
发消息 不管啥消息 除了/ncm,/ncm t也报错
难以复现该bug,但可以尝试下新的版本
pip install nonebot-plugin-ncm --upgrade
1.0.2版本 输入/ncm t同样报错
File "/usr/local/lib/python3.9/site-packages/nonebot/message.py", line 154, in _run_matcher await matcher.run(bot, event, state) File "/usr/local/lib/python3.9/site-packages/nonebot/matcher.py", line 584, in run await handler(self, bot, event, self.state) File "/usr/local/lib/python3.9/site-packages/nonebot/handler.py", line 81, in call await self.func( File "/usr/local/lib/python3.9/site-packages/nonebot-plugin-ncm/init.py", line 102, in set_receive if event.dict()['sender']['role'] in ncm_config.ncm_admin or str(event.dict()['sender']['user_id']) in ncm_config.superusers: File "pydantic/main.py", line 510, in pydantic.main.BaseModel.dict return dict( File "pydantic/main.py", line 875, in _iter v = self._get_value( File "pydantic/main.py", line 816, in pydantic.main.BaseModel._get_value return v.class(*seq_args) if is_namedtuple(v.class) else v.class(seq_args) File "/usr/local/lib/python3.9/site-packages/nonebot/adapters/_base.py", line 330, in init self.extend(self._construct(message)) File "/usr/local/lib/python3.9/site-packages/nonebot/adapters/_base.py", line 400, in extend for segment in obj: File "/usr/local/lib/python3.9/site-packages/nonebot/adapters/cqhttp/message.py", line 265, in _construct yield MessageSegment(seg["type"], seg.get("data") or {}) File "/usr/local/lib/python3.9/site-packages/nonebot/adapters/_base.py", line 278, in getitem return self.data[key] KeyError: 'type'
不使用我的插件依旧有该bug么?
关掉插件后正常
尝试将nonebot-adapter-cqhttp
回滚到2.0.0a13版本
pip install nonebot-adapter-cqhttp==2.0.0a13
回滚后出现新的错误
08-12 10:17:31 [ERROR] nonebot | Running matcher <Matcher from.
Traceback (most recent call last):
File "/usr/local/bin/nb", line 8, in
File "/usr/local/lib/python3.9/site-packages/nonebot/messager await matcher.run(bot, event, state) File "/usr/local/lib/python3.9/site-packages/nonebot/matchern await handler(self, bot, event, state) File "/usr/local/lib/python3.9/site-packages/nonebot/handler await self.func( File "/usr/local/lib/python3.9/site-packages/nonebot-plugin-e info = setting.search(Q["group_id"] == event.dict()["group) KeyError: 'group_id'
确定是在群聊界面吗?
db
文件夹删掉重开插件
啊 我私聊
群聊中运行正常了 但是08-12 10:24:37 [ERROR] nonebot-plugin-ncm | 数据库中未有该音 地址数据 怎么解决
新版本已修复
pip install nonebot-plugin-ncm --upgrade
问题已解决 nonebot-adapter-cqhttp升级后能否使用
nonebot-adapter-cqhttp==2.0.0a14
版本有bug,无法使用
好的谢谢