py-plugin icon indicating copy to clipboard operation
py-plugin copied to clipboard

error when checking matcher

Open YLBmidous opened this issue 1 year ago • 4 comments

该报错在机器人接收到消息后出现。

0|Yunzai-Bot | [PyBot][14:51:13.716][ERROR] [message]Error when checking Matcher. 0|Yunzai-Bot | Traceback (most recent call last): 0|Yunzai-Bot | > File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\py-plugin-4GILPm_X-py3.10\lib\site-packages\nonebot\message.py", line 457, in check_and_run_matcher 0|Yunzai-Bot | if not await _check_matcher( 0|Yunzai-Bot | File "C:\Users\Administrator\Downloads\Yunzai-Bot\plugins\py-plugin\yunzai_nonebot\hijack\message.py", line 6, in wrapper 0|Yunzai-Bot | matcher = args[0] 0|Yunzai-Bot | IndexError: tuple index out of range

尝试重新安装依赖与py插件没有解决问题。 求教大佬如何解决?

YLBmidous avatar Jul 17 '23 13:07 YLBmidous

这个插件太久没更新,一旦更新了新版nonebot2依赖就会这样,装回旧版就可以了 poetry run pip install nonebot2==2.0.0rc3 -U

DUNKILL avatar Aug 08 '23 09:08 DUNKILL

这个插件太久没更新,一旦更新了新版nonebot2依赖就会这样,装回旧版就可以了 poetry run pip install nonebot2==2.0.0rc3 -U

与此同时记得检查是否有插件使用了新版Nonebot插件,有的话也回退到旧版

DUNKILL avatar Aug 08 '23 09:08 DUNKILL

转载自https://gitee.com/realhuhu/py-plugin/issues/I7N7M6

经过我一整天的研究以后 找到解决办法了

解决方法如下: 找到"你的Yunzai目录\plugins\py-plugin\yunzai_nonebot\hijack\message.py"这个文件 然后把里面的 matcher = args[0] event = args[2] 改成 matcher = kwargs.get('Matcher') event = kwargs.get('event') 就可以解决问题了

smoadrareun avatar Aug 28 '23 08:08 smoadrareun

转载自https://gitee.com/realhuhu/py-plugin/issues/I7N7M6

经过我一整天的研究以后 找到解决办法了

解决方法如下: 找到"你的Yunzai目录\plugins\py-plugin\yunzai_nonebot\hijack\message.py"这个文件 然后把里面的 matcher = args[0] event = args[2] 改成 matcher = kwargs.get('Matcher') event = kwargs.get('event') 就可以解决问题了

感谢解决问题了

xingyu42 avatar Sep 08 '23 06:09 xingyu42