root@c07b606f5403:/AstrBot# ls -la /AstrBot/data/workspaces/_Peony_FriendMessage_3372728115/cash.py
-rwxrwxrwx 1 root root 1237 Aug 11 16:47 /AstrBot/data/workspaces/_Peony_FriendMessage_3372728115/cash.py
{"messages": [{"type": "file", "path": "/AstrBot/data/workspaces/_Peony_FriendMessage_3372728115/cash.py"}], "session": ""}
ENOENT: no such file or directory
[2026-08-11 16:49:56.143] [Core]
[WARN]
[v4.27.1] [runners.tool_loop_agent_runner:1266]: Traceback (most recent call last):
File "/AstrBot/astrbot/core/agent/runners/tool_loop_agent_runner.py", line 1148, in _handle_function_tools
async for resp in self._iter_tool_executor_results(executor): # type: ignore
File "/AstrBot/astrbot/core/agent/runners/tool_loop_agent_runner.py", line 1502, in _iter_tool_executor_results
yield next_result_task.result()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/AstrBot/astrbot/core/agent/runners/tool_loop_agent_runner.py", line 1472, in _next_executor_result
return await anext(executor)
^^^^^^^^^^^^^^^^^^^^^
File "/AstrBot/astrbot/core/astr_agent_tool_exec.py", line 185, in execute
async for r in cls._execute_local(tool, run_context, **tool_args):
File "/AstrBot/astrbot/core/astr_agent_tool_exec.py", line 666, in _execute_local
resp = await asyncio.wait_for(
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
return await fut
^^^^^^^^^
File "/AstrBot/astrbot/core/astr_agent_tool_exec.py", line 807, in call_local_llm_tool
ret = await ready_to_call
^^^^^^^^^^^^^^^^^^^
File "/AstrBot/astrbot/core/tools/message_tools.py", line 338, in call
await context.context.context.send_message(target_session, message_chain)
File "/AstrBot/astrbot/core/star/context.py", line 537, in send_message
await platform.send_by_session(session, message_chain)
File "/AstrBot/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_platform_adapter.py", line 119, in send_by_session
await AiocqhttpMessageEvent.send_message(
File "/AstrBot/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_message_event.py", line 175, in send_message
await cls._dispatch_send(bot, event, is_group, session_id, [d])
File "/AstrBot/astrbot/core/platform/sources/aiocqhttp/aiocqhttp_message_event.py", line 113, in _dispatch_send
await bot.send_private_msg(
File "/usr/local/lib/python3.12/site-packages/aiocqhttp/__init__.py", line 236, in call_action
return await self._api.call_action(action=action, **params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiocqhttp/api_impl.py", line 178, in call_action
result = await self._wsr_api.call_action(action, **params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiocqhttp/api_impl.py", line 153, in call_action
return _handle_api_result(await
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiocqhttp/api_impl.py", line 38, in _handle_api_result
raise ActionFailed(result=result)
aiocqhttp.exceptions.ActionFailed: <ActionFailed status='failed', retcode=1200, data=None, message="ENOENT: no such file or directory, open '/AstrBot/data/workspaces/_Peony_FriendMessage_3372728115/cash.py'", wording="ENOENT: no such file or directory, open '/AstrBot/data/workspaces/_Peony_FriendMessage_3372728115/cash.py'", echo={'seq': 40}, stream='normal-action'>
Description
如题。
文件存在:
tool call 参数:
也没有错误。
但是工具调用返回:
Reproduction Steps
在 aiocqhttp 平台部署 Docker 配置的 AstrBot V4.27.1 并在私聊中让其发送一个位于自己当前工作区的文件。
AstrBot Version
V4.27.1
Operating System
Linux
Deployment Method
Docker version 29.6.2, build dfc4efb1e2
Message Platform Adapter
Onebot (
aiocqhttp) V11 with NapCat v4.18.9, QQ 3.2.28-48517.Error Log
Supplementary Information
No response
Checklist