Closed LeoWrDeom closed 3 months ago
我自己取消精华机器人也会报错:
08-29 17:30:00 [ERROR] nonebot | Running Matcher(type='', module=nonebot_plugin_essence_message, lineno=33) failed.
Traceback (most recent call last):
File "G:\today\today\bot.py", line 46, in <module>
nonebot.run(app="__mp_main__:app")
File "G:\today\today\.venv\lib\site-packages\nonebot\__init__.py", line 335, in run
get_driver().run(*args, **kwargs)
File "G:\today\today\.venv\lib\site-packages\nonebot\drivers\fastapi.py", line 186, in run
uvicorn.run(
File "G:\today\today\.venv\lib\site-packages\uvicorn\main.py", line 577, in run
server.run()
File "G:\today\today\.venv\lib\site-packages\uvicorn\server.py", line 65, in run
return asyncio.run(self.serve(sockets=sockets))
File "C:\Users\Leo\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\Leo\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 636, in run_until_complete
self.run_forever()
File "C:\Users\Leo\AppData\Local\Programs\Python\Python310\lib\asyncio\windows_events.py", line 321, in run_forever
super().run_forever()
File "C:\Users\Leo\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 603, in run_forever
self._run_once()
File "C:\Users\Leo\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1909, in _run_once
handle._run()
File "C:\Users\Leo\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "G:\today\today\.venv\lib\site-packages\nonebot\message.py", line 476, in check_and_run_matcher
await _run_matcher(
> File "G:\today\today\.venv\lib\site-packages\nonebot\message.py", line 428, in _run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "G:\today\today\.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 850, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "G:\today\today\.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 825, in simple_run
await handler(
File "G:\today\today\.venv\lib\site-packages\nonebot\dependencies\__init__.py", line 94, in __call__
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "G:\today\today\.venv\lib\site-packages\nonebot_plugin_essence_message\__init__.py", line 70, in _
msg = await bot.get_msg(message_id=event.message_id)
File "G:\today\today\.venv\lib\site-packages\nonebot\internal\adapter\bot.py", line 122, in call_api
raise exception
File "G:\today\today\.venv\lib\site-packages\nonebot\internal\adapter\bot.py", line 97, in call_api
result = await self.adapter._call_api(self, api, **data)
File "G:\today\today\.venv\lib\site-packages\nonebot\adapters\onebot\v11\adapter.py", line 147, in _call_api
return handle_api_result(await self._result_store.fetch(seq, timeout))
File "G:\today\today\.venv\lib\site-packages\nonebot\adapters\onebot\v11\utils.py", line 58, in handle_api_result
raise ActionFailed(**result)
nonebot.adapters.onebot.v11.exception.ActionFailed: ActionFailed(status='failed', retcode=200, data=None, echo='15')
应该是因为napcat的设精和取消设精华event没有返回管理员的id issue
框架使用的Lagrange,需要换nc吗
稍等
刚刚试了下,旧版本也是这个报错,限新加的群,之前做过数据的群倒是没啥问题,群精华如果只有刚加入的精华也没啥问题,提取新加入的群的历史精华就会报错
那没问题, 就是没有办法获取这种在bot进群之前的消息内容 如果是精华消息, 可以从精华的api拿到 所以这种消息只能用fetchall获取
最上面那个报错是fetchall指令的,刚刚试了下Lagrange直接报错,nc返回成功保存 0/3 条精华消息
现在更新了下面那个, 如果get_msg失败会在所有精华消息里找
我不知道上面那个是为什么, 看起来就是调用了一下get_essence_msg_list就报错了 有没有更多可以提供的信息了
看您需要什么信息,我去测试提取
主要是我无法复现,从而无法debug 如果长期无法正常使用的话,或许可以换个qq号先试试
这种情况跟群精华内容有关系吗,新加的群精华里还有压缩包啥的啥都有
能不能把您的号拉我们群试下
发我群号 beisnwkznan@outlook.com
其实我还没写文件的支持,感觉加上要大重构
感觉可以另开一个issue
我在.env里添加了配置项后自己好了,没理解什么原理,,,
之前没配置,使用的默认参数
新版本报错