fix: update file reading method to handle bytes format in E2BEnvironment

This commit is contained in:
Harry 2026-02-05 14:25:13 +08:00
parent eb87512122
commit 6b0e6b2785
1 changed files with 2 additions and 2 deletions

View File

@ -216,8 +216,8 @@ class E2BEnvironment(VirtualEnvironment):
"""
remote_path = self._workspace_path(path)
sandbox = self.metadata.store[self.StoreKey.SANDBOX]
content = sandbox.files.read(remote_path)
return BytesIO(content.encode())
content = sandbox.files.read(remote_path, format="bytes")
return BytesIO(bytes(content))
def list_files(self, directory_path: str, limit: int) -> Sequence[FileState]:
"""