{"record":{"id":"c5e40174251d2e99","repo":"kovidgoyal/kitty","slug":"the-value-val-is-not-a-valid-choice-for-scrollba","errorCode":null,"errorMessage":"The value {val} is not a valid choice for scrollbar","messagePattern":"The value (.+?) is not a valid choice for scrollbar","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"kitty/options/parse.py","lineNumber":1282,"sourceCode":"    def resize_in_steps(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['resize_in_steps'] = to_bool(val)\n\n    def scrollback_fill_enlarged_window(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['scrollback_fill_enlarged_window'] = to_bool(val)\n\n    def scrollback_lines(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['scrollback_lines'] = scrollback_lines(val)\n\n    def scrollback_pager(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['scrollback_pager'] = to_cmdline(val)\n\n    def scrollback_pager_history_size(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['scrollback_pager_history_size'] = scrollback_pager_history_size(val)\n\n    def scrollbar(self, val: str, ans: dict[str, typing.Any]) -> None:\n        val = val.lower()\n        if val not in self.choices_for_scrollbar:\n            raise ValueError(f\"The value {val} is not a valid choice for scrollbar\")\n        ans[\"scrollbar\"] = val\n\n    choices_for_scrollbar = frozenset(('scrolled', 'always', 'never', 'hovered', 'scrolled-and-hovered', 'scrolled-or-hovered'))\n\n    def scrollbar_gap(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['scrollbar_gap'] = positive_float(val)\n\n    def scrollbar_handle_color(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['scrollbar_handle_color'] = scrollbar_color(val)\n\n    def scrollbar_handle_opacity(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['scrollbar_handle_opacity'] = positive_float(val)\n\n    def scrollbar_hitbox_expansion(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['scrollbar_hitbox_expansion'] = positive_float(val)\n\n    def scrollbar_hover_width(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['scrollbar_hover_width'] = positive_float(val)","sourceCodeStart":1264,"sourceCodeEnd":1300,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/parse.py#L1264-L1300","documentation":"The scrollbar option in kitty.conf only accepts: scrolled, always, never, hovered, scrolled-and-hovered, scrolled-or-hovered. The parser lowercases the value and raises ValueError on anything else. Newer scrollbar modes (hovered variants) only exist in recent kitty versions.","triggerScenarios":"Setting `scrollbar` to a string outside the allowed set, e.g. `scrollbar auto`, `scrollbar on/off`, or using `hovered` on a kitty version older than the one that introduced it.","commonSituations":"Migrating from other terminals that use on/off/auto semantics; running an older kitty binary against a config written for a newer release.","solutions":["Use one of: scrolled, always, never, hovered, scrolled-and-hovered, scrolled-or-hovered","If `hovered` is rejected, upgrade kitty to a version that supports hover-based scrollbars","Verify no trailing spaces or quotes around the value in kitty.conf"],"exampleFix":"# before\nscrollbar auto\n# after\nscrollbar always","handlingStrategy":"validation","validationCode":"value = value.lower()\nif value not in ('scrolled','always','never','hovered','scrolled-and-hovered','scrolled-or-hovered'):\n    raise SystemExit(f'bad scrollbar: {value}')","typeGuard":"def is_scrollbar(v: str) -> bool:\n    return v.lower() in ('scrolled','always','never','hovered','scrolled-and-hovered','scrolled-or-hovered')","tryCatchPattern":null,"preventionTips":["Upgrade kitty before using hovered variants","Run kitty --debug-config to catch invalid options early"],"tags":["kitty","config","validation","scrollbar"],"backgroundTag":"config-invalid-choice","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}