Perseus037 / nonebot_plugin_batarot

碧蓝档案塔罗牌-nonebot2插件(支持多适配器)
GNU General Public License v3.0
42 stars 5 forks source link

使用指令 ba占卜 时报错 #4

Closed QSlotus closed 8 months ago

QSlotus commented 8 months ago

使用指令 ba占卜 时报错 日志如下

02-17 10:34:37 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_batarot.commands, lineno=4)
02-17 10:34:47 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_batarot.commands, lineno=4) running complete
02-17 10:34:47 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_batarot.commands, lineno=4) failed.
Traceback (most recent call last):
  File "/data/nb/bot.py", line 44, in <module>
    nonebot.run(app="__mp_main__:app")
  File "/usr/local/lib/python3.10/dist-packages/nonebot/__init__.py", line 333, in run
    get_driver().run(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/nonebot/drivers/fastapi.py", line 185, in run
    uvicorn.run(
  File "/usr/local/lib/python3.10/dist-packages/uvicorn/main.py", line 587, in run
    server.run()
  File "/usr/local/lib/python3.10/dist-packages/uvicorn/server.py", line 62, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.10/dist-packages/nonebot/message.py", line 476, in check_and_run_matcher
    await _run_matcher(
> File "/usr/local/lib/python3.10/dist-packages/nonebot/message.py", line 428, in _run_matcher
    await matcher.run(bot, event, state, stack, dependency_cache)
  File "/usr/local/lib/python3.10/dist-packages/nonebot/internal/matcher/matcher.py", line 842, in run
    await self.simple_run(bot, event, state, stack, dependency_cache)
  File "/usr/local/lib/python3.10/dist-packages/nonebot/internal/matcher/matcher.py", line 817, in simple_run
    await handler(
  File "/usr/local/lib/python3.10/dist-packages/nonebot/dependencies/__init__.py", line 106, in __call__
    return await cast(Callable[..., Awaitable[R]], self.call)(**values)
  File "/usr/local/lib/python3.10/dist-packages/nonebot_plugin_batarot/handler.py", line 85, in handle_tarot_spread_one_v11
    await bot.send_group_forward_msg(group_id=event.group_id, messages=nodes)
  File "/usr/local/lib/python3.10/dist-packages/nonebot/internal/adapter/bot.py", line 122, in call_api
    raise exception
  File "/usr/local/lib/python3.10/dist-packages/nonebot/internal/adapter/bot.py", line 97, in call_api
    result = await self.adapter._call_api(self, api, **data)
  File "/usr/local/lib/python3.10/dist-packages/nonebot/adapters/onebot/v11/adapter.py", line 147, in _call_api
    return handle_api_result(await self._result_store.fetch(seq, timeout))
  File "/usr/local/lib/python3.10/dist-packages/nonebot/adapters/onebot/v11/utils.py", line 58, in handle_api_result
    raise ActionFailed(**result)
nonebot.adapters.onebot.v11.exception.ActionFailed: ActionFailed(status='failed', retcode=404, data=None, echo='29')
Perseus037 commented 8 months ago

我建议你先重新git clone一下,用ide看看是不是你自己的依赖存在版本冲突 一开始看见404还以为是图床的问题,测试了一下一切正常

QSlotus commented 8 months ago

怎么看,不太会(捂脸

Perseus037 commented 8 months ago

你机器人部署在哪个虚拟环境,就把给git clone的源码替换过去 逐个打开源码,看最上方import的库有没有被正确引用,没有正确引用的就手动重新安装到对应的环境了再重载 图床和源码都没问题,那问题要么出在依赖上,要么就是你挂反向ws的框架不支持消息合并转发或者用的版本太老,这都属于下游问题,只能靠你自己排查

QSlotus commented 8 months ago

好的,谢谢了