kitUIN / nonebot-plugin-ncm

✨ 基于go-cqhttp与nonebot2的 网易云 无损音乐 点歌/下载 ✨
Apache License 2.0
80 stars 3 forks source link

发送消息后台错误信息刷屏 #30

Closed ghitori closed 3 hours ago

ghitori commented 3 hours ago

错误日志

Rule check failed for Matcher(type='message', module=nonebot-plugin-ncm, lineno=103).
  + Exception Group Traceback (most recent call last):
  |   File "/home/shan_shanhy/Kei/bot.py", line 25, in <module>
  |     nonebot.run()
  |   File "/home/shan_shanhy/Kei/.venv/lib/python3.12/site-packages/nonebot/__init__.py", line 337, in run
  |     get_driver().run(*args, **kwargs)
  |   File "/home/shan_shanhy/Kei/.venv/lib/python3.12/site-packages/nonebot/drivers/fastapi.py", line 188, in run
  |     uvicorn.run(
  |   File "/home/shan_shanhy/Kei/.venv/lib/python3.12/site-packages/uvicorn/main.py", line 579, in run
  |     server.run()
  |   File "/home/shan_shanhy/Kei/.venv/lib/python3.12/site-packages/uvicorn/server.py", line 65, in run
  |     return asyncio.run(self.serve(sockets=sockets))
  |   File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run
  |     return runner.run(main)
  |   File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run
  |     return self._loop.run_until_complete(task)
  |   File "/home/shan_shanhy/Kei/.venv/lib/python3.12/site-packages/nonebot/utils.py", line 254, in run_coro_with_shield
  |     return await coro
  |   File "/home/shan_shanhy/Kei/.venv/lib/python3.12/site-packages/nonebot/message.py", line 496, in check_and_run_matcher
  |     if not await _check_matcher(
  | > File "/home/shan_shanhy/Kei/.venv/lib/python3.12/site-packages/nonebot/message.py", line 400, in _check_matcher
  |     if not await Matcher.check_rule(bot, event, state, stack, dependency_cache):
  |   File "/home/shan_shanhy/Kei/.venv/lib/python3.12/site-packages/nonebot/internal/matcher/matcher.py", line 403, in check_rule
  |     return event_type == (cls.type or event_type) and await cls.rule(
  |   File "/home/shan_shanhy/Kei/.venv/lib/python3.12/site-packages/nonebot/internal/rule.py", line 97, in __call__
  |     with catch({SkippedException: _handle_skipped_exception}):
  |   File "/home/shan_shanhy/Kei/.venv/lib/python3.12/site-packages/exceptiongroup/_catch.py", line 39, in __exit__
  |     raise unhandled from exc.__cause__
  |   File "/home/shan_shanhy/Kei/.venv/lib/python3.12/site-packages/nonebot/internal/rule.py", line 98, in __call__
  |     async with anyio.create_task_group() as tg:
  |   File "/home/shan_shanhy/Kei/.venv/lib/python3.12/site-packages/anyio/_backends/_asyncio.py", line 763, in __aexit__
  |     raise BaseExceptionGroup(
  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/home/shan_shanhy/Kei/.venv/lib/python3.12/site-packages/nonebot/internal/rule.py", line 95, in _run_checker
    |     result &= is_passed
    | TypeError: unsupported operand type(s) for &=: 'bool' and 'NoneType'
    +------------------------------------

复现版本

kitUIN commented 3 hours ago

没看出有效信息

ghitori commented 3 hours ago

没看出有效信息

我也没看出有效信息

插件本身工作仍是正常的,貌似是插件调用Nonebot后 Nonebot的问题

先关掉Issue吧,我去Nonebot提一下看看