kovidgoyal/kitty · error · ValueError
The value {val} is not a valid choice for tab_bar_style
Error message
The value {val} is not a valid choice for tab_bar_style What it means
tab_bar_style selects the tab bar renderer and must be one of fade, hidden, powerline, separator, slant, custom. The parser lowercases and validates against this frozenset; custom requires you to supply a tab_bar_style definition via separate config.
Source
Thrown at kitty/options/parse.py:1409
def tab_bar_margin_color(self, val: str, ans: dict[str, typing.Any]) -> None:
ans['tab_bar_margin_color'] = to_color_or_none(val)
def tab_bar_margin_height(self, val: str, ans: dict[str, typing.Any]) -> None:
ans['tab_bar_margin_height'] = tab_bar_margin_height(val)
def tab_bar_margin_width(self, val: str, ans: dict[str, typing.Any]) -> None:
ans['tab_bar_margin_width'] = positive_float(val)
def tab_bar_min_tabs(self, val: str, ans: dict[str, typing.Any]) -> None:
ans['tab_bar_min_tabs'] = tab_bar_min_tabs(val)
def tab_bar_show_new_tab_button(self, val: str, ans: dict[str, typing.Any]) -> None:
ans['tab_bar_show_new_tab_button'] = to_bool(val)
def tab_bar_style(self, val: str, ans: dict[str, typing.Any]) -> None:
val = val.lower()
if val not in self.choices_for_tab_bar_style:
raise ValueError(f"The value {val} is not a valid choice for tab_bar_style")
ans["tab_bar_style"] = val
choices_for_tab_bar_style = frozenset(('fade', 'hidden', 'powerline', 'separator', 'slant', 'custom'))
def tab_fade(self, val: str, ans: dict[str, typing.Any]) -> None:
ans['tab_fade'] = tab_fade(val)
def tab_powerline_style(self, val: str, ans: dict[str, typing.Any]) -> None:
val = val.lower()
if val not in self.choices_for_tab_powerline_style:
raise ValueError(f"The value {val} is not a valid choice for tab_powerline_style")
ans["tab_powerline_style"] = val
choices_for_tab_powerline_style = frozenset(('angled', 'round', 'slanted'))
def tab_separator(self, val: str, ans: dict[str, typing.Any]) -> None:
ans['tab_separator'] = tab_separator(val)
View on GitHub (pinned to 6d5d0c4406)
Solutions
- Use one of: fade, hidden, powerline, separator, slant, custom
- If using custom, ensure you have the required custom tab bar implementation (tab_bar_style.py / kittens) set up
- Check spelling — e.g. it is 'powerline', not 'powerlines'
Example fix
# before tab_bar_style powerlines # after tab_bar_style powerline
Defensive patterns
Strategy: validation
Validate before calling
value = value.lower()
if value not in ('fade','hidden','powerline','separator','slant','custom'):
raise SystemExit(f'bad tab_bar_style: {value}') Type guard
def is_tab_bar_style(v: str) -> bool:
return v.lower() in ('fade','hidden','powerline','separator','slant','custom') Prevention
- Only choose custom after implementing the custom tab bar
- Double-check spelling when copying themes
When it happens
Trigger: Setting `tab_bar_style custom` without defining the custom tab bar functions, or using an unknown style like `tab_bar_style minimal` or `tab_bar_style powerline10`.
Common situations: Typos (e.g. 'powerlin'), using community themes written as Lua/other plugins with different style names, or picking 'custom' without implementing draw_tab_bar in a custom Python file.
Related errors
- The value {val} is not a valid choice for tab_bar_align
- The value {val} is not a valid choice for tab_powerline_styl
- The value {x} is not a known choice
- The value {val} is not a valid choice for progress_bar
- The value {val} is not a valid choice for scrollbar
AI-assisted analysis of kovidgoyal/kitty@6d5d0c4406 (2026-08-27).
Data as JSON: /api/errors/deef851a3beeba11.
Report an issue: GitHub.