{"record":{"id":"3e2bb049b61d80d6","repo":"github/spec-kit","slug":"preset-pack-id-not-found-in-catalog","errorCode":null,"errorMessage":"Preset '{pack_id}' not found in catalog","messagePattern":"Preset '(.+?)' not found in catalog","errorType":"exception","errorClass":"PresetError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/presets/__init__.py","lineNumber":4823,"sourceCode":"        self, pack_id: str, target_dir: Optional[Path] = None\n    ) -> Path:\n        \"\"\"Download a preset archive from a catalog.\n\n        Args:\n            pack_id: ID of the preset to download\n            target_dir: Directory to save the archive\n\n        Returns:\n            Path to the downloaded archive\n\n        Raises:\n            PresetError: If pack not found or download fails\n        \"\"\"\n        import urllib.error\n\n        pack_info = self.get_pack_info(pack_id)\n        if not pack_info:\n            raise PresetError(\n                f\"Preset '{pack_id}' not found in catalog\"\n            )\n\n        # Bundled presets without a download URL must be installed locally\n        if pack_info.get(\"bundled\") and not pack_info.get(\"download_url\"):\n            from ..extensions import REINSTALL_COMMAND\n            raise PresetError(\n                f\"Preset '{pack_id}' is bundled with spec-kit and has no download URL. \"\n                f\"It should be installed from the local package. \"\n                f\"Use 'specify preset add {pack_id}' to install from the bundled package, \"\n                f\"or reinstall spec-kit if the bundled files are missing: {REINSTALL_COMMAND}\"\n            )\n\n        if not pack_info.get(\"_install_allowed\", True):\n            catalog_name = pack_info.get(\"_catalog_name\", \"unknown\")\n            raise PresetError(\n                f\"Preset '{pack_id}' is from the '{catalog_name}' catalog which does not allow installation. \"\n                f\"Use --from with the preset's repository URL instead.\"","sourceCodeStart":4805,"sourceCodeEnd":4841,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/presets/__init__.py#L4805-L4841","documentation":"The requested pack_id does not exist in the merged catalog data. get_pack_info(pack_id) consults all active catalogs merged by priority; a miss means no active catalog (including the bundled one) declares that ID, so download_preset_archive raises PresetError before any network activity.","triggerScenarios":"Calling download_preset_archive (directly or via 'specify preset install') with a pack_id that is misspelled, was renamed/removed upstream, or lives only in a catalog that is not configured/enabled.","commonSituations":"Typo in the pack id; preset renamed in a newer catalog revision; catalog config only includes the default catalog while the pack lives in a third-party one; stale cache hiding a newly added pack.","solutions":["List available presets to confirm the exact id: run 'specify preset list' (or search)","Add or enable the catalog that contains the pack in your catalog config","Refresh cached catalog data (clear preset cache) so newly published packs appear","Check the pack id spelling — ids are case-sensitive"],"exampleFix":"# before\nmanager.download_preset_archive(\"mytem\")  # typo\n\n# after\nmanager.download_preset_archive(\"mytheme\")","handlingStrategy":"validation","validationCode":"packs = manager.get_pack_info(pack_id)  # returns falsy when absent\nif not packs:\n    available = [p[\"id\"] for p in manager.search()]\n    raise KeyError(f\"{pack_id!r} not in catalog; available: {available}\")","typeGuard":"def pack_exists(manager, pack_id: str) -> bool:\n    return bool(manager.get_pack_info(pack_id))","tryCatchPattern":"try:\n    archive = manager.download_preset_archive(pack_id)\nexcept PresetError as e:\n    if \"not found in catalog\" in str(e):\n        suggest_similar(manager, pack_id)  # fuzzy-match ids for the user\n    raise","preventionTips":["Resolve ids via list/search before calling download","Treat pack ids as case-sensitive and copy them verbatim from catalog output"],"tags":["presets","catalog","not-found"],"backgroundTag":null,"analyzedSha":"bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c","analyzedAt":"2026-08-14T19:43:37.150Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}