Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Fix bug in python docs examples when reading files
Tomas Valentaf863a594e275
diff --git a/apps/web/src/app/(docs)/docs/filesystem/download/page.mdx b/apps/web/src/app/(docs)/docs/filesystem/download/page.mdxindex 4ada9102b..d9f9de798 100644--- a/apps/web/src/app/(docs)/docs/filesystem/download/page.mdx+++ b/apps/web/src/app/(docs)/docs/filesystem/download/page.mdx@@ -22,7 +22,7 @@ sandbox = Sandbox()# Read file from sandboxcontent = sandbox.files.read('/path/in/sandbox')# Write file to local filesystem-with open('/local/path', 'wb') as file:+with open('/local/path', 'w') as file:file.write(content)```</CodeGroup>diff --git a/apps/web/src/app/(docs)/docs/quickstart/upload-download-files/page.mdx b/apps/web/src/app/(docs)/docs/quickstart/upload-download-files/page.mdxindex 291976479..5872f67fe 100644--- a/apps/web/src/app/(docs)/docs/quickstart/upload-download-files/page.mdx+++ b/apps/web/src/app/(docs)/docs/quickstart/upload-download-files/page.mdx@@ -92,7 +92,7 @@ sbx = Sandbox.create()# Download file from the sandbox to path '/home/user/my-file'content = sbx.files.read('/home/user/my-file')# Write file to local path-with open('/local/file', 'wb') as file:+with open('/local/file', 'w') as file:file.write(content)```</CodeGroup>@@ -126,13 +126,13 @@ sbx = Sandbox.create()# Download file A from the sandbox to path '/home/user/my-file-a'contentA = sbx.files.read('/home/user/my-file-a')# Write file A to local path-with open('/local/file/a', 'wb') as file:+with open('/local/file/a', 'w') as file:file.write(contentA)# Download file B from the sandbox to path '/home/user/my-file-b'contentB = sbx.files.read('/home/user/my-file-b')# Write file B to local path-with open('/local/file/b', 'wb') as file:+with open('/local/file/b', 'w') as file:file.write(contentB)```</CodeGroup>