{"record":{"id":"d21601f2c82f70a5","repo":"langchain-ai/deepagents","slug":"path-does-not-exist-path","errorCode":null,"errorMessage":"Path does not exist: {path}","messagePattern":"Path does not exist: (.+?)","errorType":"exception","errorClass":"MarketplaceError","httpStatus":null,"severity":"error","filePath":"libs/code/deepagents_code/plugins/marketplace.py","lineNumber":221,"sourceCode":"    if (\n        \"/\" in value\n        and \":\" not in value\n        and not value.startswith(\"@\")\n        and _GITHUB_REPO_RE.match(repo)\n    ):\n        return RepositoryMarketplaceSource(\n            source_type=\"github\", value=repo, ref=ref if sep else None\n        )\n\n    msg = \"Invalid marketplace source format. Try: owner/repo, https://..., or ./path\"\n    raise MarketplaceError(msg)\n\n\ndef _marketplace_source_from_path(value: str) -> MarketplaceSource:\n    path = Path(value).expanduser().resolve()\n    if not path.exists():\n        msg = f\"Path does not exist: {path}\"\n        raise MarketplaceError(msg)\n    if path.is_file():\n        if path.suffix != \".json\":\n            msg = f\"File path must point to a .json marketplace file: {path}\"\n            raise MarketplaceError(msg)\n        return LocalMarketplaceSource(source_type=\"file\", value=str(path))\n    if path.is_dir():\n        return LocalMarketplaceSource(source_type=\"directory\", value=str(path))\n    msg = f\"Path is neither a file nor a directory: {path}\"\n    raise MarketplaceError(msg)\n\n\ndef _root_for_marketplace_file(path: Path) -> Path:\n    for relative in _MARKETPLACE_RELATIVE_PATHS:\n        if (\n            len(path.parts) >= len(relative.parts)\n            and path.parts[-len(relative.parts) :] == relative.parts\n        ):\n            return path.parents[len(relative.parts) - 1]","sourceCodeStart":203,"sourceCodeEnd":239,"githubUrl":"https://github.com/langchain-ai/deepagents/blob/a1af029e6e73cb17c36bff823d227747b28e91e1/libs/code/deepagents_code/plugins/marketplace.py#L203-L239","documentation":"`_marketplace_source_from_path` resolves the given path (`expanduser().resolve()`) and raises this error if nothing exists at that location (marketplace.py:217-221). The library requires local marketplace sources to point at a real file or directory before it will create a `LocalMarketplaceSource`. Note the message contains the resolved absolute path, which may differ from what the user typed.","triggerScenarios":"`parse_marketplace_source('./missing-dir')`, `'~/no-such/marketplace.json'`, `'/abs/path/that/does/not/exist'`, or a bare relative name that does not exist on disk and falls through to this helper. Raised via `add_marketplace_source` or `_plugin_repository_source`.","commonSituations":"Typos in the directory name; running the command from a different working directory than expected (relative path resolves elsewhere); deleting or renaming a local marketplace checkout after registering it in config; `~` expansion pointing to another user's home.","solutions":["Verify the path exists with `ls`/`test -e` relative to your current working directory.","Use an absolute path or `~/` prefix to remove working-directory ambiguity.","Clone or create the local marketplace repository first, then re-run the add command."],"exampleFix":"// before\nadd_marketplace_source(\"./my-plugins\")   # directory absent\n// after\ngit clone https://github.com/owner/my-plugins.git\nadd_marketplace_source(\"./my-plugins\")","handlingStrategy":"validation","validationCode":"from pathlib import Path\n\ndef validate_existing_path(raw: str) -> str:\n    p = Path(raw).expanduser().resolve()\n    if not p.exists():\n        raise FileNotFoundError(f\"Marketplace path does not exist: {p}\")\n    return raw","typeGuard":"from pathlib import Path\n\ndef is_existing_file_or_dir(value: str) -> bool:\n    p = Path(value).expanduser().resolve()\n    return p.is_file() or p.is_dir()","tryCatchPattern":"try:\n    source = parse_marketplace_source(raw)\nexcept MarketplaceError as exc:\n    if str(exc).startswith(\"Path does not exist\"):\n        raise ValueError(\n            f\"{exc} — check the working directory and spelling of {raw!r}\"\n        ) from exc\n    raise","preventionTips":["Use absolute paths or `~/...` in configs so relative paths don't depend on the cwd.","Run `ls <path>` (or `Path(...).exists()`) before registering a local marketplace.","Re-verify registered local marketplace paths after moving or renaming checkouts."],"tags":["filesystem","path","validation"],"backgroundTag":"path-not-found","analyzedSha":"a1af029e6e73cb17c36bff823d227747b28e91e1","analyzedAt":"2026-08-29T11:43:24.718Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}