{"record":{"id":"b7b34e79bd2c66c7","repo":"langchain-ai/deepagents","slug":"failed-to-enumerate-group-entry-points-no-third","errorCode":null,"errorMessage":"Failed to enumerate {group} entry points; no third-party plugins in this group will load: {type(exc).__name__}: {exc}","messagePattern":"Failed to enumerate (.+?) entry points; no third-party plugins in this group will load: (.+?): (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"libs/deepagents/deepagents/profiles/_builtin_profiles.py","lineNumber":215,"sourceCode":"        `TypeError` / etc. The plugin's registrations are silently absent\n        if this is suppressed, so the elevated level helps users notice.\n\n    Plugins are iterated in whatever order\n    `importlib.metadata.entry_points` returns — callers MUST NOT rely on\n    a specific ordering when two plugins register under the same key.\n    Registration semantics are additive (`register_*_profile` merges on\n    top), so later entries layer on earlier ones.\n\n    Args:\n        group: Entry-point group name to iterate (e.g.\n            `deepagents.provider_profiles`).\n    \"\"\"\n    try:\n        eps = entry_points(group=group)\n    except Exception as exc:  # noqa: BLE001\n        msg = f\"Failed to enumerate {group} entry points; no third-party plugins in this group will load: {type(exc).__name__}: {exc}\"\n        logger.warning(msg, exc_info=True)\n        warnings.warn(msg, stacklevel=2)\n        return\n    for ep in eps:\n        plugin_label = _format_plugin_label(ep)\n        try:\n            register = ep.load()\n        except Exception as exc:\n            msg = f\"Skipping {group} plugin {plugin_label}: failed to load entry point {ep.value!r}: {type(exc).__name__}: {exc}\"\n            logger.exception(msg)\n            warnings.warn(msg, stacklevel=2)\n            continue\n        if not callable(register):\n            msg = f\"Skipping {group} plugin {plugin_label}: entry point {ep.value!r} did not resolve to a callable.\"\n            logger.error(msg)\n            warnings.warn(msg, stacklevel=2)\n            continue\n        try:\n            register()\n        except Exception as exc:","sourceCodeStart":197,"sourceCodeEnd":233,"githubUrl":"https://github.com/langchain-ai/deepagents/blob/a1af029e6e73cb17c36bff823d227747b28e91e1/libs/deepagents/deepagents/profiles/_builtin_profiles.py#L197-L233","documentation":"A warning emitted when `importlib.metadata.entry_points(group=...)` itself raises while `_invoke_profile_plugins` loads third-party profile plugins. Because enumeration failed for the whole group (e.g. malformed `dist-info` metadata in site-packages), NO plugin in that group loads, even ones that are individually healthy. It is logged at WARNING with a traceback via `exc_info=True`.","triggerScenarios":"Calling any API that triggers `_ensure_builtin_profiles_loaded` (most deepagents entry points) in an environment where `entry_points(group='deepagents.provider_profiles')` throws — typically corrupted or hand-edited `*.dist-info/METADATA`/`RECORD` files, or a broken `importlib.metadata` state.","commonSituations":"Interrupted `pip install`/`uv pip` leaving partial dist-info; manually deleting package files from site-packages; mixing package managers in one environment; filesystem corruption in a venv or container layer.","solutions":["Read the WARNING log line (it includes a traceback) to identify which distribution's metadata is broken.","Reinstall the offending package: `pip install --force-reinstall <pkg>` (or delete and recreate the venv).","Recreate the environment from your lockfile (`uv sync` / `pip install -r requirements.txt`) if multiple distributions look damaged.","As a workaround, clear only the broken `*.dist-info` directory so enumeration no longer raises, then reinstall that package."],"exampleFix":"# before: corrupted metadata in .venv\npip list  # may crash or misreport\n\n# after: clean rebuild\nrm -rf .venv && uv sync","handlingStrategy":"validation","validationCode":"python -c \"from importlib.metadata import entry_points; print(len(entry_points(group='deepagents.provider_profiles')))\"\n# if this raises, your environment metadata is broken — fix before importing deepagents","typeGuard":"def entry_points_healthy(group: str) -> bool:\n    try:\n        from importlib.metadata import entry_points\n        entry_points(group=group)\n        return True\n    except Exception:\n        return False","tryCatchPattern":"import warnings\nwith warnings.catch_warnings(record=True) as caught:\n    warnings.simplefilter(\"always\")\n    load_app()\nfor w in caught:\n    if \"Failed to enumerate\" in str(w.message):\n        group = str(w.message).split()[3]\n        raise RuntimeError(f\"Environment metadata broken; plugin group {group} skipped. Rebuild the venv.\")","preventionTips":["Avoid killing pip/uv mid-install; use atomic installs in containers.","Never hand-edit files under site-packages or *.dist-info.","Rebuild venvs from lockfiles rather than patching installed packages in place.","Run `pip check` in CI to catch metadata/dependency inconsistencies early.","Use one package manager per environment."],"tags":["plugins","entry-points","packaging","environment","python"],"backgroundTag":"broken-package-metadata","analyzedSha":"a1af029e6e73cb17c36bff823d227747b28e91e1","analyzedAt":"2026-08-29T11:43:24.718Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}