{"record":{"id":"d97e577578c15fba","repo":"NousResearch/hermes-agent","slug":"pet-slug-is-not-installed","errorCode":null,"errorMessage":"pet '{slug}' is not installed","messagePattern":"pet '(.+?)' is not installed","errorType":"exception","errorClass":"PetStoreError","httpStatus":null,"severity":"error","filePath":"agent/pet/store.py","lineNumber":291,"sourceCode":"    if pet is None or not pet.exists:\n        raise PetStoreError(f\"register of generated pet '{slug}' did not produce a spritesheet\")\n    return pet\n\n\ndef export_pet(slug: str) -> tuple[str, bytes]:\n    \"\"\"Zip an installed pet's folder (pet.json + spritesheet) → (filename, bytes).\n\n    Dotfiles (cached thumbs, backups) are skipped so the archive is a clean,\n    re-importable pet package. Raises :class:`PetStoreError` if not installed.\n    \"\"\"\n    import io\n    import zipfile\n\n    root = pets_dir()\n    directory = root / slug.strip()\n    # Guard against traversal: the target must be a direct child of pets_dir.\n    if directory.resolve().parent != root.resolve() or not directory.is_dir():\n        raise PetStoreError(f\"pet '{slug}' is not installed\")\n\n    name = directory.name\n    buf = io.BytesIO()\n    with zipfile.ZipFile(buf, \"w\", zipfile.ZIP_DEFLATED) as archive:\n        for path in sorted(directory.iterdir()):\n            if path.is_file() and not path.name.startswith(\".\"):\n                archive.write(path, f\"{name}/{path.name}\")\n    return f\"{name}.zip\", buf.getvalue()\n\n\n_THUMB_FRAME_W = 192\n_THUMB_FRAME_H = 208\n_THUMB_W = 96  # rendered ~40px; 2x+ keeps it crisp on HiDPI\n\n\ndef _thumbs_dir() -> Path:\n    path = pets_dir() / \".thumbs\"\n    path.mkdir(parents=True, exist_ok=True)","sourceCodeStart":273,"sourceCodeEnd":309,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/agent/pet/store.py#L273-L309","documentation":"Error \"pet '{slug}' is not installed\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at agent/pet/store.py:291 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Install the pet first, then retry the action.","List installed pets to confirm the slug."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}