无法正常运行插件模块,报错信息:TypeError: on_prefix() takes from 2 to 3 positional arguments but 4 were given
Closed this issue · 4 comments
[2023-07-26 12:43:25,609 nonebot] ERROR: Failed to import "hoshino.modules.kanna_connection_redive.clanbattle", error: on_prefix() takes from 2 to 3 positional arguments but 4 were given
[2023-07-26 12:43:25,617 nonebot] ERROR: on_prefix() takes from 2 to 3 positional arguments but 4 were given
Traceback (most recent call last):
File "D:\Program Files\Python\lib\site-packages\nonebot\plugin.py", line 263, in load_plugin
module = importlib.import_module(module_path)
File "D:\Program Files\Python\lib\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in load_unlocked
File "", line 783, in exec_module
File "", line 219, in call_with_frames_removed
File "D:\Pcrbot_Test3\HoshinoBot_Test3\hoshino\modules\kanna_connection_redive\clanbattle_init.py", line 509, in
@sv.on_prefix('今日战报', '昨日战报', '我的战报')
TypeError: on_prefix() takes from 2 to 3 positional arguments but 4 were given
感谢您能抽出时间进行解答。
请问这个错误情况如何解决。
虽然把战报这段直接#注释掉,插件就能正常跑起来了。还是求解
更新hoshino
更新hoshino
好的,我尝试一下。
更新hoshino
问题得到解决,感谢!