plugins-for-Hoshino
plugins-for-Hoshino copied to clipboard
你问我答, 自定义回答功能报错
[2020-08-13 15:51:23,665 nonebot] INFO: Self: 2574515137, Message 434 from 920536508@[群:710152895]: 'fullmatch<台服公告>#http://www.princessconnect.so-net.tw/news' [2020-08-13 15:51:23,733 自定义问答] INFO: Message 434 triggered add_reply by RexTrigger. [2020-08-13 15:51:23,756 自定义问答] ERROR: <class 'AttributeError'> occured when add_reply handling message 434. [2020-08-13 15:51:23,782 自定义问答] ERROR: can't set attribute Traceback (most recent call last): File "/root/HoshinoBot/hoshino/msghandler.py", line 28, in handle_message await sf.func(bot, event) File "/root/HoshinoBot/hoshino/modules/shebot/reply/init.py", line 145, in add_reply await Res.save_image(event) File "/root/HoshinoBot/hoshino/util4sh.py", line 70, in save_image event.raw_message = str(event.message) AttributeError: can't set attribute
[2020-08-13 16:06:48,446 nonebot] INFO: Self: 2574515137, Message 435 from 920536508@[群:710152895]: '我问3你答4' [2020-08-13 16:06:48,555 我问你答] INFO: Message 435 triggered add_reply_for_self by RexTrigger. [2020-08-13 16:06:48,623 我问你答] ERROR: <class 'AttributeError'> occured when add_reply_for_self handling message 435. [2020-08-13 16:06:48,677 我问你答] ERROR: can't set attribute Traceback (most recent call last): File "/root/HoshinoBot/hoshino/msghandler.py", line 28, in handle_message await sf.func(bot, event) File "/root/HoshinoBot/hoshino/modules/shebot/QA/init.py", line 19, in add_reply_for_self await R.save_image(event) File "/root/HoshinoBot/hoshino/util4sh.py", line 70, in save_image event.raw_message = str(event.message) AttributeError: can't set attribute [2020-08-13 16:06:48,956 nonebot] INFO: Message 435 is ignored
启动的时候报这些错, 不知道有没有影响
[2020-08-13 15:41:12,728 nonebot] ERROR: Failed to import "hoshino.modules.shebot.scheduledMessage", error: call_action() takes 2 positional arguments but 3 were given
[2020-08-13 15:41:12,822 nonebot] ERROR: call_action() takes 2 positional arguments but 3 were given
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/nonebot/plugin.py", line 249, in load_plugin
module = importlib.import_module(module_path)
File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "
似乎是你的aiocqhttp版本太低了,要1.3.0版本
似乎是你的aiocqhttp版本太低了,要1.3.0版本
我看了一下, 我的aiocqhttp版本为1.25, 我尝试使用 pip3 install --upgrade aiocqhttp 升级, 结果告诉我 :
ERROR: nonebot 1.6.0 has requirement aiocqhttp<1.3,>=1.2, but you'll have aiocqhttp 1.3.1 which is incompatible.
问题解决了, 不过不知道不跟nonebot1.6兼容, 会有什么bug. 不过我查看错误日志, 发现另一个问题 :
当bot撤回涩图时, 就会报这个错 :
[2020-08-13 22:18:50,627 涩图] ERROR: <class 'aiocqhttp.exceptions.ActionFailed'> occured when send_common_setu handling message 289128. [2020-08-13 22:18:50,698 涩图] ERROR: <ActionFailed, retcode=100> Traceback (most recent call last): File "/root/HoshinoBot/hoshino/msghandler.py", line 28, in handle_message await sf.func(bot, event) File "/root/HoshinoBot/hoshino/modules/shebot/setu/init.py", line 116, in send_common_setu await send_setus(bot,event,'nr18_setu', setus, WITH_URL, is_to_delete) File "/root/HoshinoBot/hoshino/modules/shebot/setu/data_source.py", line 77, in send_setus await bot.delete_msg(self_id=self_id, message_id=msg_id) File "/usr/local/lib/python3.8/site-packages/aiocqhttp/init.py", line 219, in call_action return await self._api.call_action(action=action, **params) File "/usr/local/lib/python3.8/site-packages/aiocqhttp/api_impl.py", line 186, in call_action result = await self._wsr_api.call_action(action, **params) File "/usr/local/lib/python3.8/site-packages/aiocqhttp/api_impl.py", line 161, in call_action return _handle_api_result( File "/usr/local/lib/python3.8/site-packages/aiocqhttp/api_impl.py", line 51, in _handle_api_result raise ActionFailed(retcode=result.get('retcode')) aiocqhttp.exceptions.ActionFailed: <ActionFailed, retcode=100>