autogen icon indicating copy to clipboard operation
autogen copied to clipboard

Magentic One Interface docker code executor import error

Open sayanghosh123 opened this issue 2 years ago • 2 comments

What happened?

I am trying to get the sample interface at https://github.com/microsoft/autogen/blob/main/python/packages/autogen-magentic-one/interface/example_magentic_one_helper.py to work

Note - I have Magentic working on my DevBox, i.e. I can run https://github.com/microsoft/autogen/blob/main/python/packages/autogen-magentic-one/examples/example.py. I've managed to do all the pip installs inside Autogen as per the main Readme of Magentic

(python) PS C:\Code\Autogen\python\packages\autogen-magentic-one> python .\interface\example_magentic_one_helper.py Traceback (most recent call last): File "C:\Code\Autogen\python\packages\autogen-magentic-one\interface\example_magentic_one_helper.py", line 1, in from magentic_one_helper import MagenticOneHelper File "C:\Code\Autogen\python\packages\autogen-magentic-one\interface\magentic_one_helper.py", line 14, in from autogen_ext.code_executor.docker_executor import DockerCommandLineCodeExecutor ModuleNotFoundError: No module named 'autogen_ext.code_executor'

What did you expect to happen?

I was hoping the example interface would provide me with a graphical view similar to the 4 videos posted with the initial blog.

How can we reproduce it (as minimally and precisely as possible)?

python .\interface\example_magentic_one_helper.py

AutoGen version

0.4.0.dev8

Which package was this bug in

Magentic One

Model used

GPT-4o

Python version

Python 3.12.7

Operating system

OS Name Microsoft Windows 11 Enterprise N Version 10.0.26100 Build 26100

Any additional info you think would be helpful for fixing this bug

No response

sayanghosh123 avatar Dec 02 '24 10:12 sayanghosh123

This in https://github.com/microsoft/autogen/blob/main/python/packages/autogen-magentic-one/interface/example_magentic_one_helper.py

from autogen_ext.code_executor.docker_executor import DockerCommandLineCodeExecutor

Should be updated to:

from autogen_ext.code_executors import DockerCommandLineCodeExecutor

And after #4410 is completed, it should be updated to:

from autogen_ext.code_executors.docker import DockerCommandLineCodeExecutor

@husseinmozannar @lspinheiro for awareness.

ekzhu avatar Dec 02 '24 20:12 ekzhu

Fixed. @sayanghosh123

ekzhu avatar Jan 06 '25 19:01 ekzhu