Skip to content

Commit e5a3f24

Browse files
Fix code interpreting documentation snippets (#624)
the following issues with the code-interpreting documentation have been fixed: 1. https://e2b.dev/docs/code-interpreting/analyze-data-with-ai not working in python 2. https://e2b.dev/docs/code-interpreting/create-charts-visualizations/static-charts unnecessary line of code in python --------- Co-authored-by: Mish Ushakov <10400064+mishushakov@users.noreply.github.com>
1 parent b6b0ac6 commit e5a3f24

2 files changed

Lines changed: 1 addition & 3 deletions

File tree

  • apps/web/src/app/(docs)/docs/code-interpreting

apps/web/src/app/(docs)/docs/code-interpreting/analyze-data-with-ai/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ with open("../dataset.csv", "rb") as f:
462462

463463
def run_ai_generated_code(ai_generated_code: str):
464464
print('Running the code in the sandbox....')
465-
execution = sbx.notebook.exec_cell(ai_generated_code)
465+
execution = sbx.run_code(ai_generated_code)
466466
print('Code execution finished!')
467467

468468
# First let's check if the code ran successfully.

apps/web/src/app/(docs)/docs/code-interpreting/create-charts-visualizations/static-charts/page.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ if (firstResult.png) {
3939
import base64
4040
from e2b_code_interpreter import Sandbox
4141

42-
sbx = Sandbox()
43-
4442
code_to_run = """
4543
import matplotlib.pyplot as plt
4644

0 commit comments

Comments
 (0)