E2B icon indicating copy to clipboard operation
E2B copied to clipboard

[E2B-463] Unexpected errors with WS

Open jakubno opened this issue 1 year ago • 1 comments

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} 

E2B-463

jakubno avatar Jan 23 '24 09:01 jakubno

Probably only python by the message, but needs to be checked

jakubno avatar Jan 23 '24 09:01 jakubno

We stopped using websockets in the new (beta) SDK, so this issue is no longer relevant.

ValentaTomas avatar Jul 22 '24 22:07 ValentaTomas