{"record":{"id":"2d34d5d7aa2f5a31","repo":"kovidgoyal/kitty","slug":"the-value-val-is-not-a-valid-choice-for-undercur","errorCode":null,"errorMessage":"The value {val} is not a valid choice for undercurl_style","messagePattern":"The value (.+?) is not a valid choice for undercurl_style","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"kitty/options/parse.py","lineNumber":1474,"sourceCode":"\n    choices_for_terminfo_type = frozenset(('path', 'direct', 'none'))\n\n    def text_composition_strategy(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['text_composition_strategy'] = str(val)\n\n    def text_fg_override_threshold(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['text_fg_override_threshold'] = text_fg_override_threshold(val)\n\n    def touch_scroll_multiplier(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['touch_scroll_multiplier'] = float(val)\n\n    def transparent_background_colors(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['transparent_background_colors'] = transparent_background_colors(val)\n\n    def undercurl_style(self, val: str, ans: dict[str, typing.Any]) -> None:\n        val = val.lower()\n        if val not in self.choices_for_undercurl_style:\n            raise ValueError(f\"The value {val} is not a valid choice for undercurl_style\")\n        ans[\"undercurl_style\"] = val\n\n    choices_for_undercurl_style = frozenset(('thin-sparse', 'thin-dense', 'thick-sparse', 'thick-dense'))\n\n    def underline_exclusion(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['underline_exclusion'] = underline_exclusion(val)\n\n    def underline_hyperlinks(self, val: str, ans: dict[str, typing.Any]) -> None:\n        val = val.lower()\n        if val not in self.choices_for_underline_hyperlinks:\n            raise ValueError(f\"The value {val} is not a valid choice for underline_hyperlinks\")\n        ans[\"underline_hyperlinks\"] = val\n\n    choices_for_underline_hyperlinks = frozenset(('hover', 'always', 'never'))\n\n    def update_check_interval(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['update_check_interval'] = float(val)\n","sourceCodeStart":1456,"sourceCodeEnd":1492,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/parse.py#L1456-L1492","documentation":"undercurl_style selects how undercurls (squiggly underlines) are rendered and must be one of thin-sparse, thin-dense, thick-sparse, thick-dense. The parser lowercases and validates against this frozenset.","triggerScenarios":"Setting `undercurl_style thick`, `undercurl_style dense`, or using a space instead of the hyphen (`thin sparse`) in kitty.conf.","commonSituations":"Specifying only half the compound value; using a space or underscore instead of hyphen; typos from manually editing spell-check styling configs.","solutions":["Use a full compound value: thin-sparse, thin-dense, thick-sparse, or thick-dense","Ensure the two words are joined by a hyphen with no spaces","Fix partial values like 'thick' by choosing sparse or dense"],"exampleFix":"# before\nundercurl_style thick\n# after\nundercurl_style thick-sparse","handlingStrategy":"validation","validationCode":"value = value.lower()\nif value not in ('thin-sparse','thin-dense','thick-sparse','thick-dense'):\n    raise SystemExit(f'bad undercurl_style: {value}')","typeGuard":"def is_undercurl_style(v: str) -> bool:\n    return v.lower() in ('thin-sparse','thin-dense','thick-sparse','thick-dense')","tryCatchPattern":null,"preventionTips":["Always hyphenate the compound value","Pick both thickness and density"],"tags":["kitty","config","validation","undercurl","rendering"],"backgroundTag":"config-invalid-choice","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}