agentscope-ai / agentscope-ai/agentscope-java

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

Đang mở
#2,365 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
area/extensions bug
Ngôn ngữ chính
Java
Star
5.6k
Fork
1.3k
Merge trung bình
4 ngày 12 giờ
Pull request đã merge (30 ngày)
77

Mô tả

# 运行版本:

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、使用源代码默认的镜像,应能正确运行相关命令。否则,请给出特定镜像版本要求。

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.