SAGIRI-kawaii / sagiri-bot

基于Graia Ariadne和Mirai的QQ机器人 SAGIRI-BOT
GNU Affero General Public License v3.0
696 stars 83 forks source link

[Bug Report]搜图/搜番 功能无法使用 #164

Closed sxjeru closed 2 years ago

sxjeru commented 2 years ago

环境信息

系统版本: Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-90-generic x86_64) 源码版本: v2.1.7 其他信息: mirai-api-http-v1.12.0

问题描述

发送“搜图”“搜番”后无任何回应,后台报错。 saucenaoApiKey 已正常获取。

日志

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/graia/broadcast/__init__.py", line 204, in Executor
    result = await run_always_await_safely(
  File "/usr/local/lib/python3.8/dist-packages/graia/broadcast/utilles.py", line 30, in run_always_await_safely
    return await callable(*args, **kwargs)
  File "/root/sagiri-bot-2.1.7/SAGIRIBOT/Handler/Handlers/BangumiSearchHandler.py", line 36, in bangumi_search_handler
    if result := await BangumiSearchHandler.handle(app, message, group, member):
  File "/root/sagiri-bot-2.1.7/SAGIRIBOT/decorators.py", line 92, in wrapper
    return await func(*args, **kwargs)
  File "/root/sagiri-bot-2.1.7/SAGIRIBOT/decorators.py", line 116, in wrapper
    return await func(*args, **kwargs)
  File "/root/sagiri-bot-2.1.7/SAGIRIBOT/Handler/Handlers/BangumiSearchHandler.py", line 54, in handle
    await app.sendGroupMessage(group, MessageChain.create([
  File "/usr/local/lib/python3.8/dist-packages/graia/application/__init__.py", line 67, in wrapped_network_action_callable
    return await network_action_callable(self, *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/graia/application/utilles.py", line 27, in wrapper
    return await func(self, *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/graia/application/__init__.py", line 644, in sendGroupMessage
    response.raise_for_status()
  File "/usr/local/lib/python3.8/dist-packages/aiohttp/client_reqrep.py", line 1004, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL('http://127.0.0.1:12580/sendGroupMessage')
nullqwertyuiop commented 2 years ago

发送消息错误,请检查 mirai-api-http 是否已正确配置且允许 WebSocket,若无配置错误请检查群组设置是否设置发言频率上限。

nullqwertyuiop commented 2 years ago

请问使用的 mirai 版本是?

sxjeru commented 2 years ago

检查了都没问题,其他指令可正常响应。 mirai: 2.9.0-M1

nullqwertyuiop commented 2 years ago

降级到 2.7-stable 试试?

nullqwertyuiop commented 2 years ago

mah v1.12.0 支援的最高版本好像就是 2.7-stable 了

sxjeru commented 2 years ago

降级 mirai 后可用。感谢帮助。

sxjeru commented 2 years ago

mirai 降级到 2.7.0 后无法发送图片,正在尝试稍微升一点版本。

nullqwertyuiop commented 2 years ago

2.7.1()我嘴瓢了 -------- 原始信息 --------发件人: sxjeru @.> 日期: 2021/12/12 14:51 (GMT+08:00) 收件人: SAGIRI-kawaii/sagiri-bot @.> 抄送: Null @.>, Comment @.> 主题: Re: [SAGIRI-kawaii/sagiri-bot] [Bug Report]搜图/搜番 功能无法使用 (Issue #164)

mirai 降级到 2.7.0 后无法发送图片,正在尝试稍微升一点版本。

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe.

sxjeru commented 2 years ago

目前怀疑 mirai 2.7.1 亦已无法发送图片,若更新 mirai,则由于 mah v1 不支持导致搜图搜番等功能无法使用;若再更新 mah,则 sagiri-bot 报网络错误,日志如下。

[2022-01-01 08:40:00,673][INFO]: initializing app...
Traceback (most recent call last):
  File "main.py", line 71, in <module>
    core.launch()
  File "/root/sagiri-bot-2.1.7/SAGIRIBOT/Core/AppCore.py", line 107, in launch
    self.__app.launch_blocking()
  File "/usr/local/lib/python3.8/dist-packages/graia/application/__init__.py", line 1613, in launch_blocking
    loop.run_until_complete(self.initialize())
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.8/dist-packages/graia/application/__init__.py", line 1503, in initialize
    await self.authenticate()
  File "/usr/local/lib/python3.8/dist-packages/graia/application/utilles.py", line 27, in wrapper
    return await func(self, *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/graia/application/__init__.py", line 304, in authenticate
    response.raise_for_status()
  File "/usr/local/lib/python3.8/dist-packages/aiohttp/client_reqrep.py", line 1004, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('http://127.0.0.1:12580/auth')

mah v2 迁移参考。 image

nullqwertyuiop commented 2 years ago

174

Evyde commented 2 years ago

目前怀疑 mirai 2.7.1 亦已无法发送图片,若更新 mirai,则由于 mah v1 不支持导致搜图搜番等功能无法使用;若再更新 mah,则 sagiri-bot 报网络错误,日志如下。

[2022-01-01 08:40:00,673][INFO]: initializing app...
Traceback (most recent call last):
  File "main.py", line 71, in <module>
    core.launch()
  File "/root/sagiri-bot-2.1.7/SAGIRIBOT/Core/AppCore.py", line 107, in launch
    self.__app.launch_blocking()
  File "/usr/local/lib/python3.8/dist-packages/graia/application/__init__.py", line 1613, in launch_blocking
    loop.run_until_complete(self.initialize())
  File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.8/dist-packages/graia/application/__init__.py", line 1503, in initialize
    await self.authenticate()
  File "/usr/local/lib/python3.8/dist-packages/graia/application/utilles.py", line 27, in wrapper
    return await func(self, *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/graia/application/__init__.py", line 304, in authenticate
    response.raise_for_status()
  File "/usr/local/lib/python3.8/dist-packages/aiohttp/client_reqrep.py", line 1004, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 404, message='Not Found', url=URL('http://127.0.0.1:12580/auth')

mah v2 迁移参考。 image

2.7.1确实也已经发不出图片了,关键是仓库Owner不知道去哪了,暂时Merge一下PR也行啊

SAGIRI-kawaii commented 2 years ago

fixed