{"record":{"id":"58d819a3adec6701","repo":"langchain-ai/deepagents","slug":"could-not-read-marketplace-manifest-manifest-path","errorCode":null,"errorMessage":"Could not read marketplace manifest {manifest_path}: {exc}","messagePattern":"Could not read marketplace manifest (.+?): (.+?)","errorType":"exception","errorClass":"MarketplaceError","httpStatus":null,"severity":"error","filePath":"libs/code/deepagents_code/plugins/marketplace.py","lineNumber":811,"sourceCode":"        name=name,\n        source=source,\n        description=description_value if isinstance(description_value, str) else None,\n        author=author,\n        display_name=(\n            display_name_value if isinstance(display_name_value, str) else None\n        ),\n    )\n\n\ndef _load_marketplace_from_path(root: Path, manifest_path: Path) -> PluginMarketplace:\n    try:\n        raw = json.loads(manifest_path.read_text(encoding=\"utf-8\"))\n    except json.JSONDecodeError as exc:\n        msg = f\"Invalid JSON syntax in {manifest_path}: {exc}\"\n        raise MarketplaceError(msg) from exc\n    except OSError as exc:\n        msg = f\"Could not read marketplace manifest {manifest_path}: {exc}\"\n        raise MarketplaceError(msg) from exc\n    if not isinstance(raw, dict):\n        msg = f\"Marketplace manifest {manifest_path} must be a JSON object\"\n        raise MarketplaceError(msg)\n    try:\n        name = _validate_name(raw.get(\"name\"), allow_at=False)\n    except ValueError as exc:\n        raise MarketplaceError(str(exc)) from exc\n    plugins_raw = raw.get(\"plugins\")\n    if not isinstance(plugins_raw, list):\n        msg = f\"Marketplace {name} must contain a plugins array\"\n        raise MarketplaceError(msg)\n    warnings: list[str] = []\n    plugins = tuple(\n        plugin\n        for entry in plugins_raw\n        if (plugin := _parse_entry(entry, warnings=warnings)) is not None\n    )\n    for warning in warnings:","sourceCodeStart":793,"sourceCodeEnd":829,"githubUrl":"https://github.com/langchain-ai/deepagents/blob/a1af029e6e73cb17c36bff823d227747b28e91e1/libs/code/deepagents_code/plugins/marketplace.py#L793-L829","documentation":"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'.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before: unreadable file\n$ chmod 600 ~/.marketplaces/team/.marketplace.json\n// after\n$ chmod 644 ~/.marketplaces/team/.marketplace.json","handlingStrategy":"validation","validationCode":"from pathlib import Path\n\ndef manifest_readable(path: Path) -> bool:\n    return path.is_file() and os.access(path, os.R_OK)","typeGuard":"def is_readable_file(p: object) -> TypeGuard[Path]:\n    return isinstance(p, Path) and p.is_file() and os.access(p, os.R_OK)","tryCatchPattern":"try:\n    mp = load_marketplace(root)\nexcept MarketplaceError as exc:\n    if \"Could not read\" in str(exc):\n        fix_permissions_or_restore(exc)\n    raise","preventionTips":["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."],"tags":["filesystem","permissions","marketplace","io"],"backgroundTag":"file-read-permission-denied","analyzedSha":"a1af029e6e73cb17c36bff823d227747b28e91e1","analyzedAt":"2026-08-29T11:43:24.718Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}