What happened / 发生了什么
在QQ开放平台机器人下使用webhook的方式发送URL图片显示富媒体文件格式不支持,文字消息正常,视频发送未测试。
同样的环境下,用WS的方式的时候就没有问题,切换到WH就出现了这个问题。
(有个小细节:我的图片是请求的时候实时渲染的,API地址结尾不是图片格式而是.php)
Reproduce / 如何复现?
用webhook的方式发送url图片
AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器
宝塔面板Docker
OS
Linux
Logs / 报错日志
[2026-04-16 03:02:58.673] [Core] [WARN] [v4.23.1] [tenacity.before_sleep:64]: Retrying astrbot.core.platform.sources.qqofficial.qqofficial_message_event.QQOfficialMessageEvent.upload_group_and_c2c_image.._do_upload in 1 seconds as it raised ServerError: 富媒体文件格式不支持.
[2026-04-16 03:02:59.844] [Core] [WARN] [v4.23.1] [tenacity.before_sleep:64]: Retrying astrbot.core.platform.sources.qqofficial.qqofficial_message_event.QQOfficialMessageEvent.upload_group_and_c2c_image..do_upload in 2 seconds as it raised ServerError: 富媒体文件格式不支持.
[2026-04-16 03:03:02.009] [Core] [ERRO] [v4.23.1] [respond.stage:287]: 发送消息链失败: chain = MessageChain(chain=[Reply(type=<ComponentType.Reply: 'Reply'>, id='ROBOT1.0_thhWEhwsWh0g-ONlcrgEnxbz2hDG12hDEOc0AI5NeF6fOEawOVCjF.r8kXZdLu9pQW-sLW2ckp5mEDBYJ6e-k2LBnPsOL4m9jxp8NoXJm8s!', chain=[], sender_id=0, sender_nickname='', time=0, message_str='', text='', qq=0, seq=0), Image(type=<ComponentType.Image: 'Image'>, file='https://ow.233.mba/heroban_img.php?mmr=Diamond', url='', path='')], use_t2i=None, type=None), error = 富媒体文件格式不支持
Traceback (most recent call last):
File "/AstrBot/astrbot/core/pipeline/respond/stage.py", line 285, in process
await event.send(chain)
File "/AstrBot/astrbot/core/platform/sources/qqofficial/qqofficial_message_event.py", line 92, in send
await self._post_send()
File "/AstrBot/astrbot/core/platform/sources/qqofficial/qqofficial_message_event.py", line 310, in _post_send
media = await self.upload_group_and_c2c_image(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/AstrBot/astrbot/core/platform/sources/qqofficial/qqofficial_message_event.py", line 497, in upload_group_and_c2c_image
result = await _do_upload()
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/tenacity/asyncio/init.py", line 193, in async_wrapped
return await copy(fn, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/tenacity/asyncio/init.py", line 112, in call
do = await self.iter(retry_state=retry_state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/tenacity/asyncio/init.py", line 157, in iter
result = await action(retry_state)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/tenacity/_utils.py", line 111, in inner
return call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/tenacity/init.py", line 413, in exc_check
raise retry_exc.reraise()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/tenacity/init.py", line 184, in reraise
raise self.last_attempt.result()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/usr/local/lib/python3.12/site-packages/tenacity/asyncio/init.py", line 116, in call
result = await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/AstrBot/astrbot/core/platform/sources/qqofficial/qqofficial_message_event.py", line 485, in _do_upload
return await self.bot.api._http.request(route, json=payload)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/botpy/http.py", line 190, in request
return await _handle_response(response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/botpy/http.py", line 85, in _handle_response
raise ServerError(message) from None # adding from None to prevent chain exception being raised
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
botpy.errors.ServerError: 富媒体文件格式不支持
Are you willing to submit a PR? / 你愿意提交 PR 吗?
Code of Conduct
What happened / 发生了什么
在QQ开放平台机器人下使用webhook的方式发送URL图片显示富媒体文件格式不支持,文字消息正常,视频发送未测试。
同样的环境下,用WS的方式的时候就没有问题,切换到WH就出现了这个问题。
(有个小细节:我的图片是请求的时候实时渲染的,API地址结尾不是图片格式而是.php)
Reproduce / 如何复现?
用webhook的方式发送url图片
AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器
宝塔面板Docker
OS
Linux
Logs / 报错日志
[2026-04-16 03:02:58.673] [Core] [WARN] [v4.23.1] [tenacity.before_sleep:64]: Retrying astrbot.core.platform.sources.qqofficial.qqofficial_message_event.QQOfficialMessageEvent.upload_group_and_c2c_image.._do_upload in 1 seconds as it raised ServerError: 富媒体文件格式不支持.
[2026-04-16 03:02:59.844] [Core] [WARN] [v4.23.1] [tenacity.before_sleep:64]: Retrying astrbot.core.platform.sources.qqofficial.qqofficial_message_event.QQOfficialMessageEvent.upload_group_and_c2c_image..do_upload in 2 seconds as it raised ServerError: 富媒体文件格式不支持.
[2026-04-16 03:03:02.009] [Core] [ERRO] [v4.23.1] [respond.stage:287]: 发送消息链失败: chain = MessageChain(chain=[Reply(type=<ComponentType.Reply: 'Reply'>, id='ROBOT1.0_thhWEhwsWh0g-ONlcrgEnxbz2hDG12hDEOc0AI5NeF6fOEawOVCjF.r8kXZdLu9pQW-sLW2ckp5mEDBYJ6e-k2LBnPsOL4m9jxp8NoXJm8s!', chain=[], sender_id=0, sender_nickname='', time=0, message_str='', text='', qq=0, seq=0), Image(type=<ComponentType.Image: 'Image'>, file='https://ow.233.mba/heroban_img.php?mmr=Diamond', url='', path='')], use_t2i=None, type=None), error = 富媒体文件格式不支持
Traceback (most recent call last):
File "/AstrBot/astrbot/core/pipeline/respond/stage.py", line 285, in process
await event.send(chain)
File "/AstrBot/astrbot/core/platform/sources/qqofficial/qqofficial_message_event.py", line 92, in send
await self._post_send()
File "/AstrBot/astrbot/core/platform/sources/qqofficial/qqofficial_message_event.py", line 310, in _post_send
media = await self.upload_group_and_c2c_image(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/AstrBot/astrbot/core/platform/sources/qqofficial/qqofficial_message_event.py", line 497, in upload_group_and_c2c_image
result = await _do_upload()
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/tenacity/asyncio/init.py", line 193, in async_wrapped
return await copy(fn, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/tenacity/asyncio/init.py", line 112, in call
do = await self.iter(retry_state=retry_state)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/tenacity/asyncio/init.py", line 157, in iter
result = await action(retry_state)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/tenacity/_utils.py", line 111, in inner
return call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/tenacity/init.py", line 413, in exc_check
raise retry_exc.reraise()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/tenacity/init.py", line 184, in reraise
raise self.last_attempt.result()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/usr/local/lib/python3.12/site-packages/tenacity/asyncio/init.py", line 116, in call
result = await fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/AstrBot/astrbot/core/platform/sources/qqofficial/qqofficial_message_event.py", line 485, in _do_upload
return await self.bot.api._http.request(route, json=payload)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/botpy/http.py", line 190, in request
return await _handle_response(response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/botpy/http.py", line 85, in _handle_response
raise ServerError(message) from None # adding from None to prevent chain exception being raised
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
botpy.errors.ServerError: 富媒体文件格式不支持
Are you willing to submit a PR? / 你愿意提交 PR 吗?
Code of Conduct