17TheWord / nonebot-plugin-mcqq

基于NoneBot的与Minecraft Server互通消息的插件
MIT License
92 stars 5 forks source link

【错误反馈】mc→qq 互通失败 #111

Closed shoucandanghehe closed 2 months ago

shoucandanghehe commented 2 months ago

运行环境

Ubuntu 22.04 Python3.11 fabric

NB插件及版本号

nonebot2 2.3.1 nonebot-plugin-mcqq 2.5.8

MC插件及版本号

MC_QQ_Fabric_1.21-2.7.2.jar

错误描述

06-29 18:43:32 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_mcqq.minecraft_msg, lineno=14) failed.
Traceback (most recent call last):
  File "<string>", line 19, in <module>
  File "/home/scdhh/bot/mcqq/.venv/lib/python3.11/site-packages/nonebot/__init__.py", line 335, in run
    get_driver().run(*args, **kwargs)
  File "/home/scdhh/bot/mcqq/.venv/lib/python3.11/site-packages/nonebot/drivers/fastapi.py", line 186, in run
    uvicorn.run(
  File "/home/scdhh/bot/mcqq/.venv/lib/python3.11/site-packages/uvicorn/main.py", line 577, in run
    server.run()
  File "/home/scdhh/bot/mcqq/.venv/lib/python3.11/site-packages/uvicorn/server.py", line 65, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "/home/scdhh/miniconda3/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
  File "/home/scdhh/miniconda3/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
  File "/home/scdhh/bot/mcqq/.venv/lib/python3.11/site-packages/nonebot/message.py", line 476, in check_and_run_matcher
    await _run_matcher(
> File "/home/scdhh/bot/mcqq/.venv/lib/python3.11/site-packages/nonebot/message.py", line 428, in _run_matcher
    await matcher.run(bot, event, state, stack, dependency_cache)
  File "/home/scdhh/bot/mcqq/.venv/lib/python3.11/site-packages/nonebot/internal/matcher/matcher.py", line 850, in run
    await self.simple_run(bot, event, state, stack, dependency_cache)
  File "/home/scdhh/bot/mcqq/.venv/lib/python3.11/site-packages/nonebot/internal/matcher/matcher.py", line 825, in simple_run
    await handler(
  File "/home/scdhh/bot/mcqq/.venv/lib/python3.11/site-packages/nonebot/dependencies/__init__.py", line 94, in __call__
    return await cast(Callable[..., Awaitable[R]], self.call)(**values)
  File "/home/scdhh/bot/mcqq/.venv/lib/python3.11/site-packages/nonebot_plugin_mcqq/minecraft_msg.py", line 21, in handle_mc_msg
    if event.message.startswith("!!"):
AttributeError: 'Message' object has no attribute 'startswith'

https://github.com/17TheWord/nonebot-plugin-mcqq/commit/4bef1e3e777f70ee81437547e30c681ab1587ff6 应该是这个提交引入的

报错日志(如果有)

No response

17TheWord commented 2 months ago

更新插件至 v2.5.8.post2 即可 pip install -U nonebot-plugin-mcqq