E2B
E2B copied to clipboard
[E2B-463] Unexpected errors with WS
Following errors were reported:
No close frame received or sent
For this code snippet
import os
from langchain.tools import E2BDataAnalysisTool
os.environ["E2B_API_KEY"] = "..."
e2b_data_analysis_tool = E2BDataAnalysisTool(
# Pass environment variables to the sandbox
env_vars={"MY_SECRET": "secret_value"},
on_stdout=lambda stdout: print("stdout:", stdout),
on_stderr=lambda stderr: print("stderr:", stderr),
)
with open("./netflix.csv") as f:
remote_path = e2b_data_analysis_tool.upload_file(
file=f,
description="Data about Netflix tv shows including their title, category, director, release date, casting, age rating, etc.",
)
print(remote_path)
This error was received
WebSocket timed out while waiting for: {"jsonrpc": "2.0", "method": "process_subscribe", "params": ["onStdout", "h2FwoI4ouvxF"], "id": 2}
Probably only python by the message, but needs to be checked
We stopped using websockets in the new (beta) SDK, so this issue is no longer relevant.