Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

websocket error in run_code() #362

Closed
sudoskys opened this issue Apr 19, 2024 · 5 comments
Closed

websocket error in run_code() #362

sudoskys opened this issue Apr 19, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@sudoskys
Copy link

sudoskys commented Apr 19, 2024

[DEBUG] | E2b:stdout: 
stderr:  | @2024-04-19T12:44:36.983435+0800
Exception ignored in: <async_generator object Connect.__aiter__ at 0x752245783a40>
Traceback (most recent call last):
  File "/home/<user>/Project/Project/LlmKira/Openaibot/.venv/lib/python3.11/site-packages/e2b/sandbox/websocket_client.py", line 107, in _connect
    break
RuntimeError: async generator ignored GeneratorExit

Code here:
https://github.com/LlmKira/Openaibot/blob/236c843e67ae1302018d6c812b61f3d4eb0ca4a7/llmkira/extra/plugins/e2b_code_interpreter/__init__.py#L36

@mlejva
Copy link
Member

mlejva commented Apr 19, 2024

Hi @sudoskys, thanks for reporting this! In the meantime, can you please provide minimal reproducible example?

@mlejva mlejva added the bug Something isn't working label Apr 19, 2024
@mlejva
Copy link
Member

mlejva commented Apr 19, 2024

Also @sudoskys check out our new SDK for building code interpreter like features. It might be a better fit - https://github.com/e2b-dev/code-interpreter

@sudoskys
Copy link
Author

sudoskys commented Apr 20, 2024

Hi @sudoskys, thanks for reporting this! In the meantime, can you please provide minimal reproducible example

import e2b
api_key="your_key"
stdout, stderr = e2b.run_code("Node16", "const result = (1+2+3) * 100; result", api_key=api_key)

@sudoskys
Copy link
Author

Also @sudoskys check out our new SDK for building code interpreter like features. It might be a better fit - https://github.com/e2b-dev/code-interpreter

OK, I'll check it out, thanks for your response

@sudoskys
Copy link
Author

Solved by removing nest_asyncio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants