agentscope-ai / agentscope-ai/agentscope-java

[BUG]: 使用默认镜像运行沙箱命令,write_file和edit_file工具报错

Ouverte
#2,365 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
area/extensions bug
Langage dominant
Java
Étoiles
5.6k
Forks
1.3k
Merge moyen
4 j 12 h
PR mergées (30 j)
77

Description

# 运行版本:

2.0 GA

# 运行环境:

windows 10 + docker+ubuntu:22.04镜像

# 问题描述:

我在windows10下使用docker沙箱方式运行智能体,我用的默认镜像ubuntu:22.04

通过跟踪代码发现,BaseSandboxFilesystem.write方法执行如下命令:
``` bash
"if [ -e 'outputs/f1b0c43599814be3bcfc2778c1d7bd72zzz/test3.txt' ]; then echo 'EXISTS'; exit 1; fi; mkdir -p "$(dirname 'outputs/f1b0c43599814be3bcfc2778c1d7bd72zzz/test3.txt')" 2>&1"
```

checkResult返回如下信息:
``` bash
"'outputs/f1b0c43599814be3bcfc2778c1d7bd72zzz/test3.txt') 2>&1: 1: Syntax error: end of file unexpected (expecting ")")"
```
checkResult.exitCode是2

此时程序报错信息:
``` bash
"Error: Failed to write file 'outputs/f1b0c43599814be3bcfc2778c1d7bd72zzz/test3.txt'"
```

另外,调用BaseSandboxFilesystem.edit时, 会报如下错误:
``` bash
unexpected server response: sys,: 1: python3: not found
```

# 期望结果

1、报错信息应能反应明确的出错原因。
2、使用源代码默认的镜像,应能正确运行相关命令。否则,请给出特定镜像版本要求。

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.