What happened / 发生了什么
使用shipyard-neo沙盒创建文件完成后,在调用工具:astrbot_download_file时,命名为中文的文件将因为编码问题无法被正确识别并下载,报错信息为:Error downloading file “文件名”: HTTP 500 returned non-JSON error response
Reproduce / 如何复现?
使Agent在沙盒环境中制作一份中文命名的文件并发送到当前聊天窗口,即会出现上述错误。
AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器
Docker:4.64.0 (221278),Windows Docker Desktop联合部署astrbot及shipyard-neo
astrbot:4.22.2
任何消息平台均可
OS
Other
Logs / 报错日志
[19:42:08.118] [Core] [INFO] [core.event_bus:61]: [default] [webchat(webchat)] G-Back/G-Back: 帮我生成一份excel,包含数字1~10,中文命名并发给我
[19:42:08.137] [Core] [INFO] [respond.stage:184]: Prepare to send - G-Back/G-Back:
[19:42:08.137] [Core] [INFO] [respond.stage:200]: 应用流式输出(webchat)
[19:42:14.910] [Core] [INFO] [runners.tool_loop_agent_runner:698]: Agent 使用工具: ['astrbot_execute_shell']
[19:42:14.911] [Core] [INFO] [runners.tool_loop_agent_runner:744]: 使用工具:astrbot_execute_shell,参数:{'command': 'cat /workspace/skills/xlsx/SKILL.md'}
[19:42:14.912] [Core] [INFO] [computer.computer_client:452]: [Computer] Initializing booter: type=shipyard_neo, session=webchat:FriendMessage:webchat!G-Back!674cb681-52fe-48c2-86c1-2f55ff9086eb
[19:42:14.914] [Core] [INFO] [computer.computer_client:478]: [Computer] Shipyard Neo config: endpoint=http://bay:8114, profile=browser-python, ttl=3600
[19:42:14.922] [Core] [INFO] [booters.shipyard_neo:387]: [Computer] Using user-specified profile: browser-python
[19:42:14.983] [Core] [INFO] [booters.shipyard_neo:364]: Got Shipyard Neo sandbox: sandbox-bc0c65e44ef2 (profile=browser-python, capabilities=['browser', 'filesystem', 'python', 'shell'], auto=False)
[19:42:14.983] [Core] [INFO] [computer.computer_client:496]: [Computer] Sandbox booted successfully: type=shipyard_neo, session=webchat:FriendMessage:webchat!G-Back!674cb681-52fe-48c2-86c1-2f55ff9086eb
[19:42:15.137] [Core] [INFO] [computer.computer_client:401]: Uploading skills bundle to sandbox...
[19:42:25.991] [Core] [INFO] [booters.shipyard_neo:475]: [Computer] File uploaded to Neo sandbox: skills/skills.zip
[19:42:25.991] [Core] [INFO] [computer.computer_client:353]: [Computer] Skill sync phase=apply start
[19:42:26.165] [Core] [INFO] [computer.computer_client:359]: [Computer] Skill sync phase=apply done
[19:42:26.165] [Core] [INFO] [computer.computer_client:364]: [Computer] Skill sync phase=scan start
[19:42:26.329] [Core] [INFO] [computer.computer_client:375]: [Computer] Skill sync phase=scan done
[19:42:26.330] [Core] [INFO] [computer.computer_client:418]: [Computer] Sandbox skill sync complete: managed=5[19:42:49.643] [Core] [INFO] [runners.tool_loop_agent_runner:698]: Agent 使用工具: ['astrbot_execute_ipython']
[19:42:49.644] [Core] [INFO] [runners.tool_loop_agent_runner:744]: 使用工具:astrbot_execute_ipython,参数:{'code': 'from openpyxl import Workbook\nimport os\n\n# Create a new workbook\nwb = Workbook()\nsheet = wb.active\nsheet.title = "数字列表"\n\n# Add numbers 1 to 10 in column A\nfor i in range(1, 11):\n sheet.cell(row=i, column=1).value = i\n\n# Save the file with a Chinese name\nfilename = "数字1到10.xlsx"\nwb.save(filename)\nprint(f"文件已创建:{filename}")\nprint(f"文件路径:{os.path.abspath(filename)}")'}
[19:42:49.661] [Core] [INFO] [booters.shipyard_neo:504]: [Computer] Neo sandbox health check: id=sandbox-bc0c65e44ef2, status=ready, healthy=True
[19:42:50.053] [Core] [INFO] [runners.tool_loop_agent_runner:925]: Tool astrbot_execute_ipython Result: 文件已创建:数字1到10.xlsx
文件路径:/workspace/数字1到10.xlsx
[19:42:55.054] [Core] [INFO] [runners.tool_loop_agent_runner:698]: Agent 使用工具: ['astrbot_download_file']
[19:42:55.055] [Core] [INFO] [runners.tool_loop_agent_runner:744]: 使用工具:astrbot_download_file,参数:{'also_send_to_user': True, 'remote_path': '数字1到10.xlsx'}
[19:42:55.072] [Core] [INFO] [booters.shipyard_neo:504]: [Computer] Neo sandbox health check: id=sandbox-bc0c65e44ef2, status=ready, healthy=True
[19:42:56.777] [Core] [ERRO] [v4.22.2] [tools.fs:212]: Error downloading file 数字1到10.xlsx: HTTP 500 returned non-JSON error response
[19:42:56.778] [Core] [INFO] [runners.tool_loop_agent_runner:925]: Tool astrbot_download_file Result: Error downloading file: HTTP 500 returned non-JSON error response
[19:43:01.866] [Core] [INFO] [runners.tool_loop_agent_runner:698]: Agent 使用工具: ['astrbot_execute_shell']
[19:43:01.867] [Core] [INFO] [runners.tool_loop_agent_runner:744]: 使用工具:astrbot_execute_shell,参数:{'command': 'ls -la /workspace/数字1到10.xlsx'}
[19:43:01.888] [Core] [INFO] [booters.shipyard_neo:504]: [Computer] Neo sandbox health check: id=sandbox-bc0c65e44ef2, status=ready, healthy=True
[19:43:01.992] [Core] [INFO] [runners.tool_loop_agent_runner:925]: Tool astrbot_execute_shell Result: {"stdout": "-rw-r--r-- 1 root root 4914 Apr 3 11:42 /workspace/\u6570\u5b571\u523010.xlsx", "stderr": "", "exit_code": 0, "success": true, "execution_id": "exec-7f6354354969", "execution_time_ms": 82, "command": null}
[19:43:07.328] [Core] [INFO] [runners.tool_loop_agent_runner:698]: Agent 使用工具: ['astrbot_download_file']
[19:43:07.328] [Core] [INFO] [runners.tool_loop_agent_runner:744]: 使用工具:astrbot_download_file,参数:{'also_send_to_user': True, 'remote_path': '/workspace/数字1到10.xlsx'}
[19:43:07.348] [Core] [INFO] [booters.shipyard_neo:504]: [Computer] Neo sandbox health check: id=sandbox-bc0c65e44ef2, status=ready, healthy=True
[19:43:07.423] [Core] [ERRO] [v4.22.2] [tools.fs:212]: Error downloading file /workspace/数字1到10.xlsx: File not found: workspace/数字1到10.xlsx
[19:43:07.423] [Core] [INFO] [runners.tool_loop_agent_runner:925]: Tool astrbot_download_file Result: Error downloading file: File not found: workspace/数字1到10.xlsx
[19:43:14.105] [Core] [INFO] [runners.tool_loop_agent_runner:698]: Agent 使用工具: ['astrbot_execute_shell']
[19:43:14.105] [Core] [INFO] [runners.tool_loop_agent_runner:744]: 使用工具:astrbot_execute_shell,参数:{'command': 'cp /workspace/\数字1\\到\数字10\\.xlsx /tmp/数字1到10.xlsx && ls -la /tmp/数字1到10.xlsx'}
[19:43:14.130] [Core] [INFO] [booters.shipyard_neo:504]: [Computer] Neo sandbox health check: id=sandbox-bc0c65e44ef2, status=ready, healthy=True
[19:43:14.268] [Core] [INFO] [runners.tool_loop_agent_runner:925]: Tool astrbot_execute_shell Result: {"stdout": "", "stderr": "cp: cannot stat '/workspace/'$'\\346\\225\\260\\345\\255\\227''1'$'\345\210\260'''$'\\346\\225\\260\\345\\255\\227''10.xlsx': No such file or directory", "exit_code": 1, "success": false, "execution_id": "exec-52bcc002557a", "execution_time_ms": 119, "command": null}
[19:43:19.510] [Core] [INFO] [runners.tool_loop_agent_runner:698]: Agent 使用工具: ['astrbot_execute_shell']
[19:43:19.511] [Core] [INFO] [runners.tool_loop_agent_runner:744]: 使用工具:astrbot_execute_shell,参数:{'command': 'find /workspace -name "*.xlsx" 2>/dev/null | head -10'}
[19:43:19.526] [Core] [INFO] [booters.shipyard_neo:504]: [Computer] Neo sandbox health check: id=sandbox-bc0c65e44ef2, status=ready, healthy=True
[19:43:19.640] [Core] [INFO] [runners.tool_loop_agent_runner:925]: Tool astrbot_execute_shell Result: {"stdout": "/workspace/\u6570\u5b571\u523010.xlsx", "stderr": "", "exit_code": 0, "success": true, "execution_id": "exec-e0f9b31f9463", "execution_time_ms": 94, "command": null}
[19:43:25.330] [Core] [INFO] [runners.tool_loop_agent_runner:698]: Agent 使用工具: ['astrbot_download_file']
[19:43:25.330] [Core] [INFO] [runners.tool_loop_agent_runner:744]: 使用工具:astrbot_download_file,参数:{'also_send_to_user': True, 'remote_path': '/workspace/数字1到10.xlsx'}
[19:43:25.344] [Core] [INFO] [booters.shipyard_neo:504]: [Computer] Neo sandbox health check: id=sandbox-bc0c65e44ef2, status=ready, healthy=True
[19:43:25.414] [Core] [ERRO] [v4.22.2] [tools.fs:212]: Error downloading file /workspace/数字1到10.xlsx: File not found: workspace/数字1到10.xlsx
[19:43:25.415] [Core] [INFO] [runners.tool_loop_agent_runner:925]: Tool astrbot_download_file Result: Error downloading file: File not found: workspace/数字1到10.xlsx
Are you willing to submit a PR? / 你愿意提交 PR 吗?
Code of Conduct
What happened / 发生了什么
使用shipyard-neo沙盒创建文件完成后,在调用工具:astrbot_download_file时,命名为中文的文件将因为编码问题无法被正确识别并下载,报错信息为:Error downloading file “文件名”: HTTP 500 returned non-JSON error response
Reproduce / 如何复现?
使Agent在沙盒环境中制作一份中文命名的文件并发送到当前聊天窗口,即会出现上述错误。
AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器
Docker:4.64.0 (221278),Windows Docker Desktop联合部署astrbot及shipyard-neo
astrbot:4.22.2
任何消息平台均可
OS
Other
Logs / 报错日志
[19:42:08.118] [Core] [INFO] [core.event_bus:61]: [default] [webchat(webchat)] G-Back/G-Back: 帮我生成一份excel,包含数字1~10,中文命名并发给我
[19:42:08.137] [Core] [INFO] [respond.stage:184]: Prepare to send - G-Back/G-Back:
[19:42:08.137] [Core] [INFO] [respond.stage:200]: 应用流式输出(webchat)
[19:42:14.910] [Core] [INFO] [runners.tool_loop_agent_runner:698]: Agent 使用工具: ['astrbot_execute_shell']
[19:42:14.911] [Core] [INFO] [runners.tool_loop_agent_runner:744]: 使用工具:astrbot_execute_shell,参数:{'command': 'cat /workspace/skills/xlsx/SKILL.md'}
[19:42:14.912] [Core] [INFO] [computer.computer_client:452]: [Computer] Initializing booter: type=shipyard_neo, session=webchat:FriendMessage:webchat!G-Back!674cb681-52fe-48c2-86c1-2f55ff9086eb
[19:42:14.914] [Core] [INFO] [computer.computer_client:478]: [Computer] Shipyard Neo config: endpoint=http://bay:8114, profile=browser-python, ttl=3600
[19:42:14.922] [Core] [INFO] [booters.shipyard_neo:387]: [Computer] Using user-specified profile: browser-python
[19:42:14.983] [Core] [INFO] [booters.shipyard_neo:364]: Got Shipyard Neo sandbox: sandbox-bc0c65e44ef2 (profile=browser-python, capabilities=['browser', 'filesystem', 'python', 'shell'], auto=False)
[19:42:14.983] [Core] [INFO] [computer.computer_client:496]: [Computer] Sandbox booted successfully: type=shipyard_neo, session=webchat:FriendMessage:webchat!G-Back!674cb681-52fe-48c2-86c1-2f55ff9086eb
[19:42:15.137] [Core] [INFO] [computer.computer_client:401]: Uploading skills bundle to sandbox...
[19:42:25.991] [Core] [INFO] [booters.shipyard_neo:475]: [Computer] File uploaded to Neo sandbox: skills/skills.zip
[19:42:25.991] [Core] [INFO] [computer.computer_client:353]: [Computer] Skill sync phase=apply start
[19:42:26.165] [Core] [INFO] [computer.computer_client:359]: [Computer] Skill sync phase=apply done
[19:42:26.165] [Core] [INFO] [computer.computer_client:364]: [Computer] Skill sync phase=scan start
[19:42:26.329] [Core] [INFO] [computer.computer_client:375]: [Computer] Skill sync phase=scan done
[19:42:26.330] [Core] [INFO] [computer.computer_client:418]: [Computer] Sandbox skill sync complete: managed=5[19:42:49.643] [Core] [INFO] [runners.tool_loop_agent_runner:698]: Agent 使用工具: ['astrbot_execute_ipython']
[19:42:49.644] [Core] [INFO] [runners.tool_loop_agent_runner:744]: 使用工具:astrbot_execute_ipython,参数:{'code': 'from openpyxl import Workbook\nimport os\n\n# Create a new workbook\nwb = Workbook()\nsheet = wb.active\nsheet.title = "数字列表"\n\n# Add numbers 1 to 10 in column A\nfor i in range(1, 11):\n sheet.cell(row=i, column=1).value = i\n\n# Save the file with a Chinese name\nfilename = "数字1到10.xlsx"\nwb.save(filename)\nprint(f"文件已创建:{filename}")\nprint(f"文件路径:{os.path.abspath(filename)}")'}
[19:42:49.661] [Core] [INFO] [booters.shipyard_neo:504]: [Computer] Neo sandbox health check: id=sandbox-bc0c65e44ef2, status=ready, healthy=True
[19:42:50.053] [Core] [INFO] [runners.tool_loop_agent_runner:925]: Tool
astrbot_execute_ipythonResult: 文件已创建:数字1到10.xlsx文件路径:/workspace/数字1到10.xlsx
[19:42:55.054] [Core] [INFO] [runners.tool_loop_agent_runner:698]: Agent 使用工具: ['astrbot_download_file']
[19:42:55.055] [Core] [INFO] [runners.tool_loop_agent_runner:744]: 使用工具:astrbot_download_file,参数:{'also_send_to_user': True, 'remote_path': '数字1到10.xlsx'}
[19:42:55.072] [Core] [INFO] [booters.shipyard_neo:504]: [Computer] Neo sandbox health check: id=sandbox-bc0c65e44ef2, status=ready, healthy=True
[19:42:56.777] [Core] [ERRO] [v4.22.2] [tools.fs:212]: Error downloading file 数字1到10.xlsx: HTTP 500 returned non-JSON error response
[19:42:56.778] [Core] [INFO] [runners.tool_loop_agent_runner:925]: Tool
astrbot_download_fileResult: Error downloading file: HTTP 500 returned non-JSON error response[19:43:01.866] [Core] [INFO] [runners.tool_loop_agent_runner:698]: Agent 使用工具: ['astrbot_execute_shell']
[19:43:01.867] [Core] [INFO] [runners.tool_loop_agent_runner:744]: 使用工具:astrbot_execute_shell,参数:{'command': 'ls -la /workspace/数字1到10.xlsx'}
[19:43:01.888] [Core] [INFO] [booters.shipyard_neo:504]: [Computer] Neo sandbox health check: id=sandbox-bc0c65e44ef2, status=ready, healthy=True
[19:43:01.992] [Core] [INFO] [runners.tool_loop_agent_runner:925]: Tool
astrbot_execute_shellResult: {"stdout": "-rw-r--r-- 1 root root 4914 Apr 3 11:42 /workspace/\u6570\u5b571\u523010.xlsx", "stderr": "", "exit_code": 0, "success": true, "execution_id": "exec-7f6354354969", "execution_time_ms": 82, "command": null}[19:43:07.328] [Core] [INFO] [runners.tool_loop_agent_runner:698]: Agent 使用工具: ['astrbot_download_file']
[19:43:07.328] [Core] [INFO] [runners.tool_loop_agent_runner:744]: 使用工具:astrbot_download_file,参数:{'also_send_to_user': True, 'remote_path': '/workspace/数字1到10.xlsx'}
[19:43:07.348] [Core] [INFO] [booters.shipyard_neo:504]: [Computer] Neo sandbox health check: id=sandbox-bc0c65e44ef2, status=ready, healthy=True
[19:43:07.423] [Core] [ERRO] [v4.22.2] [tools.fs:212]: Error downloading file /workspace/数字1到10.xlsx: File not found: workspace/数字1到10.xlsx
[19:43:07.423] [Core] [INFO] [runners.tool_loop_agent_runner:925]: Tool
astrbot_download_fileResult: Error downloading file: File not found: workspace/数字1到10.xlsx[19:43:14.105] [Core] [INFO] [runners.tool_loop_agent_runner:698]: Agent 使用工具: ['astrbot_execute_shell']
[19:43:14.105] [Core] [INFO] [runners.tool_loop_agent_runner:744]: 使用工具:astrbot_execute_shell,参数:{'command': 'cp /workspace/\
数字1\\到\数字10\\.xlsx /tmp/数字1到10.xlsx && ls -la /tmp/数字1到10.xlsx'}[19:43:14.130] [Core] [INFO] [booters.shipyard_neo:504]: [Computer] Neo sandbox health check: id=sandbox-bc0c65e44ef2, status=ready, healthy=True
[19:43:14.268] [Core] [INFO] [runners.tool_loop_agent_runner:925]: Tool
astrbot_execute_shellResult: {"stdout": "", "stderr": "cp: cannot stat '/workspace/'$'\\346\\225\\260\\345\\255\\227''1'$'\345\210\260'''$'\\346\\225\\260\\345\\255\\227''10.xlsx': No such file or directory", "exit_code": 1, "success": false, "execution_id": "exec-52bcc002557a", "execution_time_ms": 119, "command": null}[19:43:19.510] [Core] [INFO] [runners.tool_loop_agent_runner:698]: Agent 使用工具: ['astrbot_execute_shell']
[19:43:19.511] [Core] [INFO] [runners.tool_loop_agent_runner:744]: 使用工具:astrbot_execute_shell,参数:{'command': 'find /workspace -name "*.xlsx" 2>/dev/null | head -10'}
[19:43:19.526] [Core] [INFO] [booters.shipyard_neo:504]: [Computer] Neo sandbox health check: id=sandbox-bc0c65e44ef2, status=ready, healthy=True
[19:43:19.640] [Core] [INFO] [runners.tool_loop_agent_runner:925]: Tool
astrbot_execute_shellResult: {"stdout": "/workspace/\u6570\u5b571\u523010.xlsx", "stderr": "", "exit_code": 0, "success": true, "execution_id": "exec-e0f9b31f9463", "execution_time_ms": 94, "command": null}[19:43:25.330] [Core] [INFO] [runners.tool_loop_agent_runner:698]: Agent 使用工具: ['astrbot_download_file']
[19:43:25.330] [Core] [INFO] [runners.tool_loop_agent_runner:744]: 使用工具:astrbot_download_file,参数:{'also_send_to_user': True, 'remote_path': '/workspace/数字1到10.xlsx'}
[19:43:25.344] [Core] [INFO] [booters.shipyard_neo:504]: [Computer] Neo sandbox health check: id=sandbox-bc0c65e44ef2, status=ready, healthy=True
[19:43:25.414] [Core] [ERRO] [v4.22.2] [tools.fs:212]: Error downloading file /workspace/数字1到10.xlsx: File not found: workspace/数字1到10.xlsx
[19:43:25.415] [Core] [INFO] [runners.tool_loop_agent_runner:925]: Tool
astrbot_download_fileResult: Error downloading file: File not found: workspace/数字1到10.xlsxAre you willing to submit a PR? / 你愿意提交 PR 吗?
Code of Conduct