{"record":{"id":"aa06934b96cdfcb9","repo":"langchain-ai/deepagents","slug":"entry-point-entry-name-r-does-not-resolve-to-a-p","errorCode":null,"errorMessage":"Entry point {entry.name!r} does not resolve to a Python module","messagePattern":"Entry point (.+?) does not resolve to a Python module","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"libs/code/deepagents_code/extensions/discovery.py","lineNumber":125,"sourceCode":"        SourceInfo(\n            _canonical(path),\n            is_package=path.name == \"__init__.py\",\n            source_id=plugin.plugin_id,\n            version=plugin.version,\n            installed_root=_canonical(plugin.root),\n        )\n        for plugin in plugins\n        if plugin.manifest is not None\n        for path in plugin.manifest.python_extensions\n    ]\n\n\ndef _entry_point_source(entry: importlib.metadata.EntryPoint) -> SourceInfo:\n    module = entry.value.partition(\":\")[0]\n    spec = importlib.util.find_spec(module)\n    if spec is None or spec.origin is None:\n        msg = f\"Entry point {entry.name!r} does not resolve to a Python module\"\n        raise ValueError(msg)\n    version = entry.dist.version if entry.dist is not None else None\n    return SourceInfo(\n        _canonical(Path(spec.origin)),\n        is_package=spec.submodule_search_locations is not None,\n        source_id=f\"{entry.name}@entry-point\",\n        version=version,\n        installed_root=_canonical(Path(spec.origin).parent),\n    )\n\n\ndef _entry_point_sources() -> DiscoveryResult:\n    sources: list[SourceInfo] = []\n    errors: list[str] = []\n    try:\n        entries = sorted(\n            importlib.metadata.entry_points(group=ENTRY_POINT_GROUP),\n            key=lambda entry: (entry.name, entry.value),\n        )","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/langchain-ai/deepagents/blob/a1af029e6e73cb17c36bff823d227747b28e91e1/libs/code/deepagents_code/extensions/discovery.py#L107-L143","documentation":"Raised by _entry_point_source in discovery when an extension entry point's module portion cannot be located via importlib.util.find_spec — either the module does not exist or has no resolvable file origin. It is surfaced as ValueError while enumerating entry-point sources for extension discovery.","triggerScenarios":"A package declares an extension entry point whose value references a module that is not installed/importable, or whose module resolves to a namespace package or other spec without `origin` (no file on disk).","commonSituations":"Installed a plugin package version whose entry points changed; the entry-point target module was renamed or removed; broken/partial install (metadata present but code missing); editable installs with stale metadata; namespace packages without __init__.py.","solutions":["Reinstall the package providing the entry point (pip install --force-reinstall <pkg>) so code and metadata match","Check the entry point value in the package metadata and correct it to an existing module:obj path","Verify `python -c \"import <module>\"` works in the same environment the agent runs in","Remove or upgrade stale plugin packages that declare dead entry points","If you authored the entry point, ensure it points to a real file-backed module, not a namespace package"],"exampleFix":"// before (pyproject)\n[project.entry-points.deepagents_extensions]\nmyext = \"myext_plugin.ext:new_ext\"  # module deleted\n\n// after\n[project.entry-points.deepagents_extensions]\nmyext = \"myext.extensions:new_ext\"","handlingStrategy":"try-catch","validationCode":"import importlib.util, importlib.metadata\n\ndef entry_point_ok(entry) -> bool:\n    module = entry.value.partition(\":\")[0]\n    try:\n        spec = importlib.util.find_spec(module)\n    except (ImportError, ValueError, ModuleNotFoundError):\n        return False\n    return spec is not None and spec.origin is not None","typeGuard":"def resolves_to_module(entry) -> bool:\n    module = entry.value.partition(\":\")[0]\n    spec = importlib.util.find_spec(module)\n    return spec is not None and spec.origin is not None","tryCatchPattern":"try:\n    sources = discover_extensions()\nexcept ValueError as exc:\n    logger.warning(\"skipping bad extension entry point: %s\", exc)","preventionTips":["Keep package metadata in sync with installed code; reinstall after renames","Audit entry points after upgrading plugin packages","Avoid namespace packages as entry-point targets"],"tags":["extensions","entry-point","discovery","import"],"backgroundTag":"entry-point-resolution-failed","analyzedSha":"a1af029e6e73cb17c36bff823d227747b28e91e1","analyzedAt":"2026-08-29T11:43:24.718Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}