noneplugin/nonebot-plugin-chatrecorder

使用YetAnotherPicSearch时,Bot CalledAPI Hook报错

Closed this issue · 1 comments

07-24 14:31:28 [ERROR] nonebot | Error when running CalledAPI hook. Running cancelled!
Traceback (most recent call last):
  File "C:\Users\Maniera\Documents\AINonebot\WST\WST 无bug版\bot.py", line 17, in <module>
    nonebot.run()
  File "C:\Users\Maniera\Documents\AINonebot\WST\WST 无bug版\.venv\lib\site-packages\nonebot\__init__.py", line 309, in run
    get_driver().run(*args, **kwargs)
  File "C:\Users\Maniera\Documents\AINonebot\WST\WST 无bug版\.venv\lib\site-packages\nonebot\drivers\fastapi.py", line 198, in run
    uvicorn.run(
  File "C:\Users\Maniera\Documents\AINonebot\WST\WST 无bug版\.venv\lib\site-packages\uvicorn\main.py", line 569, in run
    server.run()
  File "C:\Users\Maniera\Documents\AINonebot\WST\WST 无bug版\.venv\lib\site-packages\uvicorn\server.py", line 60, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "C:\Users\Maniera\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Users\Maniera\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 636, in run_until_complete
    self.run_forever()
  File "C:\Users\Maniera\AppData\Local\Programs\Python\Python310\lib\asyncio\windows_events.py", line 321, in run_forever
    super().run_forever()
  File "C:\Users\Maniera\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 603, in run_forever
    self._run_once()
  File "C:\Users\Maniera\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1909, in _run_once
    handle._run()
  File "C:\Users\Maniera\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "C:\Users\Maniera\Documents\AINonebot\WST\WST 无bug版\.venv\lib\site-packages\nonebot\message.py", line 467, in check_and_run_matcher
    await _run_matcher(
  File "C:\Users\Maniera\Documents\AINonebot\WST\WST 无bug版\.venv\lib\site-packages\nonebot\message.py", line 419, in _run_matcher
    await matcher.run(bot, event, state, stack, dependency_cache)
  File "C:\Users\Maniera\Documents\AINonebot\WST\WST 无bug版\.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 753, in run
    await self.simple_run(bot, event, state, stack, dependency_cache)
  File "C:\Users\Maniera\Documents\AINonebot\WST\WST 无bug版\.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 728, in simple_run
    await handler(
  File "C:\Users\Maniera\Documents\AINonebot\WST\WST 无bug版\.venv\lib\site-packages\nonebot\dependencies\__init__.py", line 108, in __call__
    return await cast(Callable[..., Awaitable[R]], self.call)(**values)
  File "C:\Users\Maniera\Documents\AINonebot\WST\WST 无bug版\.venv\lib\site-packages\YetAnotherPicSearch\__init__.py", line 272, in handle_image_search
    await image_search(
  File "C:\Users\Maniera\Documents\AINonebot\WST\WST 无bug版\.venv\lib\site-packages\YetAnotherPicSearch\__init__.py", line 106, in image_search
    await send_result_message(bot, event, result, index)
  File "C:\Users\Maniera\Documents\AINonebot\WST\WST 无bug版\.venv\lib\site-packages\YetAnotherPicSearch\__init__.py", line 207, in send_result_message
    await send_msg(bot, event, msg, index)
  File "C:\Users\Maniera\Documents\AINonebot\WST\WST 无bug版\.venv\lib\site-packages\YetAnotherPicSearch\__init__.py", line 218, in send_msg
    await bot.send_msg(
> File "C:\Users\Maniera\Documents\AINonebot\WST\WST 无bug版\.venv\lib\site-packages\nonebot\internal\adapter\bot.py", line 107, in call_api
    await asyncio.gather(*coros)
  File "C:\Users\Maniera\Documents\AINonebot\WST\WST 无bug版\.venv\lib\site-packages\nonebot_plugin_chatrecorder\adapters\onebot_v11.py", line 84, in record_send_msg
    or (api == "send_msg" and data["message_type"] == "group")
KeyError: 'message_type'

image