{"record":{"id":"c59bdcfb306f4c37","repo":"microsoft/autogen","slug":"dependencies-for-magenticonecoderagent-not-found","errorCode":null,"errorMessage":"Dependencies for MagenticOneCoderAgent not found. Please install autogen-ext with the \"magentic-one\" extra: pip install \"autogen-ext[magentic-one]\"","messagePattern":"Dependencies for MagenticOneCoderAgent not found\\. Please install autogen-ext with the \"magentic-one\" extra: pip install \"autogen-ext\\[magentic-one\\]\"","errorType":"exception","errorClass":"ImportError","httpStatus":null,"severity":"error","filePath":"python/packages/autogen-ext/src/autogen_ext/agents/magentic_one/__init__.py","lineNumber":4,"sourceCode":"try:\n    from ._magentic_one_coder_agent import MagenticOneCoderAgent\nexcept ImportError as e:\n    raise ImportError(\n        \"Dependencies for MagenticOneCoderAgent not found. \"\n        'Please install autogen-ext with the \"magentic-one\" extra: '\n        'pip install \"autogen-ext[magentic-one]\"'\n    ) from e\n\n__all__ = [\"MagenticOneCoderAgent\"]\n","sourceCodeStart":1,"sourceCodeEnd":11,"githubUrl":"https://github.com/microsoft/autogen/blob/027ecf0a379bcc1d09956d46d12d44a3ad9cee14/python/packages/autogen-ext/src/autogen_ext/agents/magentic_one/__init__.py#L1-L11","documentation":"autogen_ext.agents.magentic_one wraps its internal import of MagenticOneCoderAgent in a try/except ImportError and re-raises with an actionable message. The underlying import fails because optional dependencies (e.g. the tokenizer/models MagenticOne needs) are not installed; the package expects them via the 'magentic-one' extra of autogen-ext.","triggerScenarios":"importing autogen_ext.agents.magentic_one (or constructing MagenticOneCoderAgent) in an environment where autogen-ext was installed without the [magentic-one] extra, so a transitive dependency is missing.","commonSituations":"pip install autogen-ext (bare, no extras) followed by using MagenticOne; CI caches that strip extras; upgrading autogen-ext and losing the previously-installed extra; conda environments where extras were never installed.","solutions":["Install the extra: pip install \"autogen-ext[magentic-one]\" (add [magentic-one] to the dependency pin in pyproject/requirements).","Verify the install with pip show autogen-ext and try importing a transitive dependency to confirm it now resolves.","If it still fails after installing, check the chained exception (`raise ... from e`) — the original ImportError names the exact missing module; install that module directly to diagnose a version mismatch."],"exampleFix":"# before (shell)\npip install autogen-ext\n\n# after\npip install \"autogen-ext[magentic-one]\"","handlingStrategy":"try-catch","validationCode":"# shell precheck\n# pip show autogen-ext && python -c \"import autogen_ext.agents.magentic_one\"","typeGuard":null,"tryCatchPattern":"try:\n    from autogen_ext.agents.magentic_one import MagenticOneCoderAgent\nexcept ImportError as e:\n    log.error(\"magentic-one extra missing: %s\", e)\n    raise SystemExit(\"pip install 'autogen-ext[magentic-one]'\")","preventionTips":["Pin extras in requirements: autogen-ext[magentic-one] instead of bare autogen-ext.","After environment changes, smoke-test the import in CI.","Read the chained exception to identify the exact missing module."],"tags":["installation","dependencies","import-error","magentic-one"],"backgroundTag":null,"analyzedSha":"027ecf0a379bcc1d09956d46d12d44a3ad9cee14","analyzedAt":"2026-08-15T03:38:00.719Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}