yejue / nonebot-plugin-plus-one

复读姬,支持文本、图片表情甚至是转发卡片、分享卡片、小程序的复读。不依赖任何数据库的群聊复读姬,轻巧灵活。任意群聊+1,姬就+1
MIT License
22 stars 0 forks source link

图片复读失败,KeyError: 'file_size' #2

Closed SZ2528 closed 2 months ago

SZ2528 commented 3 months ago

bot.py

07-01 17:32:40 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_plus_one.handler, lineno=8) failed.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 116, in spawn_main
    exitcode = _main(fd, parent_sentinel)
  File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 129, in _main
    return self._bootstrap(parent_sentinel)
  File "C:\Program Files\Python310\lib\multiprocessing\process.py", line 314, in _bootstrap
    self.run()
  File "C:\Program Files\Python310\lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\rain1\AppData\Roaming\Python\Python310\site-packages\uvicorn\_subprocess.py", line 76, in subprocess_started
    target(sockets=sockets)
  File "C:\Users\rain1\AppData\Roaming\Python\Python310\site-packages\uvicorn\server.py", line 61, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "C:\Program Files\Python310\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Program Files\Python310\lib\asyncio\base_events.py", line 636, in run_until_complete
    self.run_forever()
  File "C:\Program Files\Python310\lib\asyncio\base_events.py", line 603, in run_forever
    self._run_once()
  File "C:\Program Files\Python310\lib\asyncio\base_events.py", line 1909, in _run_once
    handle._run()
  File "C:\Program Files\Python310\lib\asyncio\events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "C:\Users\rain1\AppData\Roaming\Python\Python310\site-packages\nonebot\message.py", line 476, in check_and_run_matcher
    await _run_matcher(
> File "C:\Users\rain1\AppData\Roaming\Python\Python310\site-packages\nonebot\message.py", line 428, in _run_matcher
    await matcher.run(bot, event, state, stack, dependency_cache)
  File "C:\Users\rain1\AppData\Roaming\Python\Python310\site-packages\nonebot\internal\matcher\matcher.py", line 850, in run
    await self.simple_run(bot, event, state, stack, dependency_cache)
  File "C:\Users\rain1\AppData\Roaming\Python\Python310\site-packages\nonebot\internal\matcher\matcher.py", line 825, in simple_run
    await handler(
  File "C:\Users\rain1\AppData\Roaming\Python\Python310\site-packages\nonebot\dependencies\__init__.py", line 94, in __call__
    return await cast(Callable[..., Awaitable[R]], self.call)(**values)
  File "C:\Users\rain1\AppData\Roaming\Python\Python310\site-packages\nonebot_plugin_plus_one\handler.py", line 40, in plush_handler
    if not is_equal(text_list[-1], msg):
  File "C:\Users\rain1\AppData\Roaming\Python\Python310\site-packages\nonebot_plugin_plus_one\handler.py", line 15, in is_equal
    if msg1[0].data["file_size"] == msg2[0].data["file_size"]:
KeyError: 'file_size'
yejue commented 3 months ago

这是什么图片,怎么没有 file_size