kovidgoyal/kitty · warning · SystemExit

This should be run as kitten unicode_input

Error message

This should be run as kitten unicode_input

What it means

unicode_input/main.py's main() unconditionally raises SystemExit('This should be run as kitten unicode_input') because the kitten is designed to be launched only via the kitten launcher, which imports and drives its remote-control entry points instead of executing the module directly.

Source

Thrown at kittens/unicode_input/main.py:38

--tab
type=choices
default=previous
choices=previous,code,name,emoticons,favorites
The initial tab to display. Defaults to using the tab from the previous kitten invocation.


""".format


@result_handler(has_ready_notification=True)
def handle_result(args: list[str], current_char: str, target_window_id: int, boss: BossType) -> None:
    w = boss.window_id_map.get(target_window_id)
    if w is not None:
        w.paste_text(current_char)


def main(args: list[str]) -> str | None:
    raise SystemExit('This should be run as kitten unicode_input')


if __name__ == '__main__':
    main([])
elif __name__ == '__doc__':
    import sys

    cd = sys.cli_docs  # type: ignore
    cd['usage'] = usage
    cd['options'] = OPTIONS
    cd['help_text'] = help_text
    cd['short_desc'] = 'Browse and select unicode characters by name'

View on GitHub (pinned to 6d5d0c4406)

Solutions

  1. Launch it correctly: kitten unicode_input
  2. If scripting, use kitty remote control commands instead of calling main() directly

Example fix

# before
python -m kittens.unicode_input.main
# after
kitten unicode_input
Defensive patterns

Strategy: validation

Validate before calling

import sys
if __name__ == '__main__' and sys.argv[0].endswith('main.py'):
    print('run via: kitten unicode_input')
    sys.exit(1)

Prevention

When it happens

Trigger: Running the module directly: python -m kittens.unicode_input.main or python kittens/unicode_input/main.py, or calling main(args) from a script.

Common situations: Developers experimenting with kitty kitten source files outside the kitten runtime, or copy-pasting launch commands that bypass `kitten unicode_input`.

Related errors


AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27). Data as JSON: /api/errors/f10d0e1c535f579f. Report an issue: GitHub.