kovidgoyal/kitty · error · ParsingOfArgsFailed

No colors specified

Error message

No colors specified

What it means

set-tab-color requires at least one parsed color spec; if parsing produced an empty dict (no args, or args that map to nothing), ParsingOfArgsFailed is raised.

Source

Thrown at kitty/rc/set_tab_color.py:67

the keyword NONE to revert to using the default colors.
"""
    options_spec = (
        MATCH_TAB_OPTION
        + """\n
--self
type=bool-set
Close the tab this command is run in, rather than the active tab.
"""
    )
    args = RemoteCommand.Args(spec='COLORS', json_field='colors', minimum_count=1, special_parse='parse_tab_colors(args)')

    def message_to_kitty(self, global_opts: RCOptions, opts: 'CLIOptions', args: ArgsType) -> PayloadType:
        try:
            colors = parse_colors(args)
        except Exception as err:
            raise ParsingOfArgsFailed(str(err)) from err
        if not colors:
            raise ParsingOfArgsFailed('No colors specified')
        return {'match': opts.match, 'self': opts.self, 'colors': colors}

    def response_from_kitty(self, boss: Boss, window: Window | None, payload_get: PayloadGetType) -> ResponseType:
        colors = payload_get('colors')
        s = {k: None if colors[k] is None else int(colors[k]) for k in valid_color_names if k in colors}
        for tab in self.tabs_for_match_payload(boss, window, payload_get):
            if tab:
                for k, v in s.items():
                    setattr(tab, k, v)
                tab.mark_tab_bar_dirty()
        return None


set_tab_color = SetTabColor()

View on GitHub (pinned to 6d5d0c4406)

Solutions

  1. Pass at least one color spec, e.g. 'color=red' or 'color=default' to reset
  2. Guard scripts: only invoke when the args list is non-empty

Example fix

# before
kitten @set-tab-color
# after
kitten @set-tab-color color=#ff0000
Defensive patterns

Strategy: validation

Validate before calling

assert args and any('=' in a for a in args), 'no color specs given'

Prevention

When it happens

Trigger: Running kitten @set-tab-color with no arguments, or with args that parse to an empty color set.

Common situations: Scripts conditionally building argument lists that end up empty.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


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