{"record":{"id":"7402a26a690d9da7","repo":"kovidgoyal/kitty","slug":"no-kitten-named-original-kitten-name","errorCode":null,"errorMessage":"No kitten named {original_kitten_name}","messagePattern":"No kitten named (.+?)","errorType":"console","errorClass":"SystemExit","httpStatus":null,"severity":"error","filePath":"kittens/runner.py","lineNumber":161,"sourceCode":"    kitten = resolved_kitten(kitten)\n    set_debug(kitten)\n    if kitten in all_kitten_names():\n        runpy.run_module(f'kittens.{kitten}.main', run_name=run_name)\n        return\n    kitten = original_kitten_name\n    # Look for a custom kitten\n    if not kitten.endswith('.py'):\n        kitten += '.py'\n    from kitty.constants import config_dir\n\n    path = path_to_custom_kitten(config_dir, kitten)\n    if not os.path.exists(path):\n        path = path_to_custom_kitten(config_dir, resolved_kitten(kitten))\n    if not os.path.exists(path):\n        print('Available builtin kittens:', file=sys.stderr)\n        for kitten in all_kitten_names():\n            print(kitten, file=sys.stderr)\n        raise SystemExit(f'No kitten named {original_kitten_name}')\n    m = runpy.run_path(path, init_globals={'sys': sys, 'os': os}, run_name='__run_kitten__')\n    from kitty.fast_data_types import set_options\n\n    try:\n        m['main'](sys.argv)\n    finally:\n        set_options(None)\n\n\n@run_once\ndef all_kitten_names() -> frozenset[str]:\n    ans = []\n    for name in list_kitty_resources('kittens'):\n        if '__' not in name and '.' not in name and name != 'tui':\n            ans.append(name)\n    return frozenset(ans)\n\n","sourceCodeStart":143,"sourceCodeEnd":179,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kittens/runner.py#L143-L179","documentation":"kitty's kitten runner raises SystemExit('No kitten named ...') when the requested kitten name cannot be resolved to an existing file. It first checks the literal path, then tries path_to_custom_kitten() in the config dir, then resolves builtin kitten names; if none exist, it prints all available builtin kitten names to stderr and exits. Note the SOURCE shadows the loop variable (`for kitten in all_kitten_names()`), but the message uses the original name, so it is purely informational.","triggerScenarios":"Running `kitten <name>` (or calling run_kitten directly, as get_kitten_cli_docs/get_kitten_wrapper_of/get_kitten_completer/get_kitten_conf_docs/get_kitten_extra_cli_parsers do) where <name> is neither a builtin kitten, nor a file path that exists, nor a custom kitten python file in ~/.config/kitty/kittens/. Also happens with typos or after a kitten was renamed/removed between kitty versions.","commonSituations":"Typo in kitten name in a shortcut/action in kitty.conf (e.g. launch kitten icat vs icat path issues); using a kitten name from a newer/older kitty version; custom kitten file not placed in the expected config_dir/kittens directory; scripts invoking run_kitten() with a programmatically-built name that resolves to nothing.","solutions":["Check the stderr output that precedes the exit — it lists all valid builtin kitten names; correct the name or typo.","If it's a custom kitten, place the .py file at ~/.config/kitty/kittens/<name>.py (or pass an existing file path).","Verify the kitty version (kitty --version) supports the kitten; consult the changelog for renamed/removed kittens.","If calling run_kitten programmatically, validate the name against all_kitten_names() plus your custom kitten dir before invoking it."],"exampleFix":"# before\nrun_kitten('themes2', ['themes2'])  # typo -> SystemExit: No kitten named themes2\n\n# after\nfrom kittens.runner import all_kitten_names\nif 'themes2' not in all_kitten_names() and not os.path.exists(custom_path):\n    # pick a valid kitten\n    ...","handlingStrategy":"validation","validationCode":"from kittens.runner import all_kitten_names\nimport os\n\ndef kitten_exists(name: str, config_dir: str) -> bool:\n    if os.path.exists(name):\n        return True\n    return name in all_kitten_names() or os.path.exists(\n        os.path.join(config_dir, 'kittens', resolved := f'{name}.py')\n    )\n\nif not kitten_exists('icat', '/home/me/.config/kitty'):\n    print('unknown kitten; choose from:', *all_kitten_names())","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate kitten names against all_kitten_names() before invoking them from config or scripts.","Pin your kitty version in CI/scripts so renamed kittens don't break invocations.","Keep custom kittens in ~/.config/kitty/kittens/<name>.py with a unique name that can't collide with builtins."],"tags":["kitty","kitten","unknown-name","system-exit","cli"],"backgroundTag":"unknown-command-or-module","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}