{"record":{"id":"8b6f7a118bd195c0","repo":"kovidgoyal/kitty","slug":"the-value-val-is-not-a-valid-choice-for-tab-bar","errorCode":null,"errorMessage":"The value {val} is not a valid choice for tab_bar_align","messagePattern":"The value (.+?) is not a valid choice for tab_bar_align","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"kitty/options/parse.py","lineNumber":1377,"sourceCode":"            raise ValueError(f\"The value {val} is not a valid choice for strip_trailing_spaces\")\n        ans[\"strip_trailing_spaces\"] = val\n\n    choices_for_strip_trailing_spaces = frozenset(('always', 'never', 'smart'))\n\n    def symbol_map(self, val: str, ans: dict[str, typing.Any]) -> None:\n        for k, v in symbol_map(val):\n            ans[\"symbol_map\"][k] = v\n\n    def sync_to_monitor(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['sync_to_monitor'] = to_bool(val)\n\n    def tab_activity_symbol(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['tab_activity_symbol'] = tab_activity_symbol(val)\n\n    def tab_bar_align(self, val: str, ans: dict[str, typing.Any]) -> None:\n        val = val.lower()\n        if val not in self.choices_for_tab_bar_align:\n            raise ValueError(f\"The value {val} is not a valid choice for tab_bar_align\")\n        ans[\"tab_bar_align\"] = val\n\n    choices_for_tab_bar_align = frozenset(('start', 'center', 'end', 'left', 'right'))\n\n    def tab_bar_background(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['tab_bar_background'] = to_color_or_none(val)\n\n    def tab_bar_edge(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['tab_bar_edge'] = tab_bar_edge(val)\n\n    def tab_bar_filter(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['tab_bar_filter'] = str(val)\n\n    def tab_bar_margin_color(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['tab_bar_margin_color'] = to_color_or_none(val)\n\n    def tab_bar_margin_height(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['tab_bar_margin_height'] = tab_bar_margin_height(val)","sourceCodeStart":1359,"sourceCodeEnd":1395,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/parse.py#L1359-L1395","documentation":"tab_bar_align controls horizontal alignment of the tab bar and accepts start, center, end, left, right (logical start/end and physical left/right aliases). The parser lowercases and validates the value; anything else raises this error.","triggerScenarios":"Setting `tab_bar_align middle`, `tab_bar_align center-left`, or a misspelled value like `centere` in kitty.conf.","commonSituations":"Guessing 'middle' instead of 'center'; mixing logical (start/end) and physical (left/right) values incorrectly for the current layout; typos from hand-editing configs.","solutions":["Use one of: start, center, end, left, right","Fix typos — the value must exactly match a keyword after lowercasing","Prefer logical values start/end for RTL-safe configs"],"exampleFix":"# before\ntab_bar_align middle\n# after\ntab_bar_align center","handlingStrategy":"validation","validationCode":"value = value.lower()\nif value not in ('start','center','end','left','right'):\n    raise SystemExit(f'bad tab_bar_align: {value}')","typeGuard":"def is_tab_bar_align(v: str) -> bool:\n    return v.lower() in ('start','center','end','left','right')","tryCatchPattern":null,"preventionTips":["Prefer start/end for RTL correctness","Avoid inventing compound values like center-left"],"tags":["kitty","config","validation","tab-bar"],"backgroundTag":"config-invalid-choice","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}