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

ImportError: cannot import name 'CodeInterpreter' from 'e2b_code_interpreter' #4164

Open
phact opened this issue Oct 15, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@phact
Copy link
Collaborator

phact commented Oct 15, 2024

          I think there's an e2b_code_interpreter problem as well in .19. Have you stumbled upon it?
     │                                                                                                                                                           │
                             │ /Users/.../Library/Caches/uv/archive-v0/_cr7vMV6pjW43AbOp9t_q/lib/python3.10/site-packages/langflow/base/astra_assistants/util.py:56 in <module> │
                             │                                                                                                                                                           │
                             │   53 │   │   │   │   tools_and_names[name] = obj                                                                                                          │
                             │   54                                                                                                                                                      │
                             │   55                                                                                                                                                      │
                             │ ❱ 56 tools_from_package(astra_assistants_tools)                                                                                                           │
                             │   57                                                                                                                                                      │
                             │                                                                                                                                                           │
                             │ /Users/.../Library/Caches/uv/archive-v0/_cr7vMV6pjW43AbOp9t_q/lib/python3.10/site-packages/langflow/base/astra_assistants/util.py:46 in          │
                             │ tools_from_package                                                                                                                                        │
                             │                                                                                                                                                           │
                             │   43 │   │   module_name = f"{package_name}.{module_info.name}"                                                                                           │
                             │   44 │   │                                                                                                                                                │
                             │   45 │   │   # Dynamically import the module                                                                                                              │
                             │ ❱ 46 │   │   module = importlib.import_module(module_name)                                                                                                │
                             │   47 │   │                                                                                                                                                │
                             │   48 │   │   # Iterate over all members of the module                                                                                                     │
                             │   49 │   │   for name, obj in inspect.getmembers(module, inspect.isclass):                                                                                │
                             │                                                                                                                                                           │
                             │ /Users/../Lib.rary/Application Support/uv/python/cpython-3.10.14-macos-aarch64-none/lib/python3.10/importlib/__init__.py:126 in import_module    │
                             │                                                                                                                                                           │
                             │   123 │   │   │   if character != '.':                                                                                                                    │
                             │   124 │   │   │   │   break                                                                                                                               │
                             │   125 │   │   │   level += 1                                                                                                                              │
                             │ ❱ 126 │   return _bootstrap._gcd_import(name[level:], package, level)                                                                                     │
                             │   127                                                                                                                                                     │
                             │   128                                                                                                                                                     │
                             │   129 _RELOADING = {}                                                                                                                                     │
                             │ in _gcd_import:1050                                                                                                                                       │
                             │ in _find_and_load:1027                                                                                                                                    │
                             │ in _find_and_load_unlocked:1006                                                                                                                           │
                             │ in _load_unlocked:688                                                                                                                                     │
                             │ in exec_module:883                                                                                                                                        │
                             │ in _call_with_frames_removed:241                                                                                                                          │
                             │                                                                                                                                                           │
                             │ /Users/../Library/Caches/uv/archive-v0/_cr7vMV6pjW43AbOp9t_q/lib/python3.10/site-packages/astra_assistants/tools/e2b_code_interpreter.py:3 in   │
                             │ <module>                                                                                                                                                  │
                             │                                                                                                                                                           │
                             │    1 from e2b import Sandbox                                                                                                                              │
                             │    2                                                                                                                                                      │
                             │ ❱  3 from e2b_code_interpreter import CodeInterpreter                                                                                                     │
                             │    4                                                                                                                                                      │
                             │    5 from astra_assistants.tools.tool_interface import ToolInterface                                                                                      │
                             │    6                                                                                                                                                      │
                             ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
                             ImportError: cannot import name 'CodeInterpreter' from 'e2b_code_interpreter'

Originally posted by @ogabrielluiz in #4150 (review)

@dosubot dosubot bot added the bug Something isn't working label Oct 15, 2024
@rjavedv
Copy link

rjavedv commented Oct 26, 2024

I am also facing the same issue.
│ D:\envs\langflow\Lib\site-packages\astra_assistants\tools\e2b_code_interpreter.py:3 in
│ │
│ 1 from e2b import Sandbox
│ 2 │
│ ❱ 3 from e2b_code_interpreter import CodeInterpreter
│ 4 │
│ 5 from astra_assistants.tools.tool_interface import ToolInterface
│ 6 │
────────────────────────────────────────────────────────────────────────────╯
ImportError: cannot import name 'CodeInterpreter' from 'e2b_code_interpreter' (D:\envs\langflow\Lib\site-packages\e2b_code_interpreter_init_.py)

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