Traceback (most recent call last):
File "/Users/alex/Tools/bot/.venv/lib/python3.12/site-packages/botpy/client.py", line 285, in _run_event
await coro(*args, **kwargs)
File "/Users/alex/Tools/bot/AstrBot/model/platform/qq_official.py", line 51, in on_c2c_message_create
await self.platform.handle_msg(abm)
File "/Users/alex/Tools/bot/AstrBot/model/platform/qq_official.py", line 209, in handle_msg
ret = await self.reply_msg(message, message_result.result_message, message_result.use_t2i)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/alex/Tools/bot/AstrBot/model/platform/qq_official.py", line 271, in reply_msg
_data['file_image'] = rendered_images[0].file
^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Plain' object has no attribute 'file'
Plain对象确实没有file属性,推测是属性引用不对导致的问题。
操作系统与运行终端:
该问题在macOS 15.1(Terminal)和Windows Server 2022 Azure Hotfix(PowerShell)上均出现。
该问题表现为程序在执行诸如/reset、/provider(插件提供)的指令时,机器人在聊天页中没有反馈,以/reset为例,指令可以成功生效,程序确实尝试执行过回复“重置成功”反馈,但失败并返回如下错误信息:
Traceback (most recent call last): File "/Users/alex/Tools/bot/.venv/lib/python3.12/site-packages/botpy/client.py", line 285, in _run_event await coro(*args, **kwargs) File "/Users/alex/Tools/bot/AstrBot/model/platform/qq_official.py", line 51, in on_c2c_message_create await self.platform.handle_msg(abm) File "/Users/alex/Tools/bot/AstrBot/model/platform/qq_official.py", line 209, in handle_msg ret = await self.reply_msg(message, message_result.result_message, message_result.use_t2i) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/alex/Tools/bot/AstrBot/model/platform/qq_official.py", line 271, in reply_msg _data['file_image'] = rendered_images[0].file ^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'Plain' object has no attribute 'file'
Plain对象确实没有file属性,推测是属性引用不对导致的问题。
操作系统与运行终端: 该问题在macOS 15.1(Terminal)和Windows Server 2022 Azure Hotfix(PowerShell)上均出现。
消息平台: QQ官方(群聊、私聊均出现,频道未测试)
终端信息图片(测试于macOS 15.1):