langchain-ai/deepagents · error · MarketplaceError
Could not read marketplace manifest {manifest_path}: {exc}
Error message
Could not read marketplace manifest {manifest_path}: {exc} What it means
When reading a marketplace manifest from disk, an OSError (permission denied, missing file, I/O error) is caught and re-raised as MarketplaceError with the path and OS detail. This distinguishes 'could not read the file at all' from 'file read but bad JSON'.
Source
Thrown at libs/code/deepagents_code/plugins/marketplace.py:811
name=name,
source=source,
description=description_value if isinstance(description_value, str) else None,
author=author,
display_name=(
display_name_value if isinstance(display_name_value, str) else None
),
)
def _load_marketplace_from_path(root: Path, manifest_path: Path) -> PluginMarketplace:
try:
raw = json.loads(manifest_path.read_text(encoding="utf-8"))
except json.JSONDecodeError as exc:
msg = f"Invalid JSON syntax in {manifest_path}: {exc}"
raise MarketplaceError(msg) from exc
except OSError as exc:
msg = f"Could not read marketplace manifest {manifest_path}: {exc}"
raise MarketplaceError(msg) from exc
if not isinstance(raw, dict):
msg = f"Marketplace manifest {manifest_path} must be a JSON object"
raise MarketplaceError(msg)
try:
name = _validate_name(raw.get("name"), allow_at=False)
except ValueError as exc:
raise MarketplaceError(str(exc)) from exc
plugins_raw = raw.get("plugins")
if not isinstance(plugins_raw, list):
msg = f"Marketplace {name} must contain a plugins array"
raise MarketplaceError(msg)
warnings: list[str] = []
plugins = tuple(
plugin
for entry in plugins_raw
if (plugin := _parse_entry(entry, warnings=warnings)) is not None
)
for warning in warnings:View on GitHub (pinned to a1af029e6e)
Solutions
- Check the file exists and is readable: `ls -l <path>` and `cat <path>`; fix permissions with chmod/chown.
- Repair or recreate the broken symlink pointing at the manifest.
- If on a network mount, restore the mount and retry loading the marketplace.
Example fix
// before: unreadable file $ chmod 600 ~/.marketplaces/team/.marketplace.json // after $ chmod 644 ~/.marketplaces/team/.marketplace.json
Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
def manifest_readable(path: Path) -> bool:
return path.is_file() and os.access(path, os.R_OK) Type guard
def is_readable_file(p: object) -> TypeGuard[Path]:
return isinstance(p, Path) and p.is_file() and os.access(p, os.R_OK) Try / catch
try:
mp = load_marketplace(root)
except MarketplaceError as exc:
if "Could not read" in str(exc):
fix_permissions_or_restore(exc)
raise Prevention
- Keep marketplace manifests chmod 644 and owned by the running user.
- Avoid symlinks into ephemeral mounts for marketplace directories.
- Verify a clone finished (`git status`) before registering the marketplace.
When it happens
Trigger: load_marketplace(root) (or _load_marketplace_file / add_local_marketplace) reaching _load_marketplace_from_path where manifest_path.read_text() raises OSError — e.g. path deleted between discovery and read, no read permission, or a broken symlink.
Common situations: Manifest found by find_marketplace_manifest via a symlink whose target was removed; file locked or unreadable under a different user; disk/network mount unavailable; SELinux/AppArmor denying read.
Related errors
- could not update {DEFAULT_CONFIG_PATH}
- {target}: {exc}
- debug log directory is not owned by the current user: {path}
- Cannot determine whether {str(left)!r} is {str(right)!r}: {e
- Invalid DEEPAGENTS_HOME {str(root)!r}: exists but cannot be
AI-assisted analysis of langchain-ai/deepagents@a1af029e6e (2026-08-29).
Data as JSON: /api/errors/58d819a3adec6701.
Report an issue: GitHub.