{"record":{"id":"a87bb8c830fa6cd6","repo":"kovidgoyal/kitty","slug":"the-value-val-is-not-a-valid-choice-for-terminfo","errorCode":null,"errorMessage":"The value {val} is not a valid choice for terminfo_type","messagePattern":"The value (.+?) is not a valid choice for terminfo_type","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"kitty/options/parse.py","lineNumber":1454,"sourceCode":"    def tab_title_max_length(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['tab_title_max_length'] = positive_int(val)\n\n    def tab_title_max_lines(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['tab_title_max_lines'] = positive_int(val)\n\n    def tab_title_template(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['tab_title_template'] = tab_title_template(val)\n\n    def tab_title_wrap(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['tab_title_wrap'] = tab_title_wrap(val)\n\n    def term(self, val: str, ans: dict[str, typing.Any]) -> None:\n        ans['term'] = str(val)\n\n    def terminfo_type(self, val: str, ans: dict[str, typing.Any]) -> None:\n        val = val.lower()\n        if val not in self.choices_for_terminfo_type:\n            raise ValueError(f\"The value {val} is not a valid choice for terminfo_type\")\n        ans[\"terminfo_type\"] = val\n\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()","sourceCodeStart":1436,"sourceCodeEnd":1472,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/parse.py#L1436-L1472","documentation":"terminfo_type controls how kitty writes terminfo entries and accepts only path, direct, or none. The parser lowercases and validates; invalid values abort config parsing.","triggerScenarios":"Setting `terminfo_type xterm`, `terminfo_type dirs`, or a typo in kitty.conf; or passing an invalid value when generating terminfo via the kitty CLI.","commonSituations":"Users trying to emulate other terminals' terminfo behavior with made-up names; misspelling 'direct'; older configs from versions before this option existed being linted by newer kitty.","solutions":["Use one of: path, direct, none","If you want the terminfo written to a directory, that is 'path' (combined with the terminfo path option)","Fix typos and remove quotes/extraneous characters"],"exampleFix":"# before\nterminfo_type xterm\n# after\nterminfo_type direct","handlingStrategy":"validation","validationCode":"value = value.lower()\nif value not in ('path','direct','none'):\n    raise SystemExit(f'bad terminfo_type: {value}')","typeGuard":"def is_terminfo_type(v: str) -> bool:\n    return v.lower() in ('path','direct','none')","tryCatchPattern":null,"preventionTips":["Read the terminfo docs before choosing a value","Don't emulate other terminals' names here"],"tags":["kitty","config","validation","terminfo"],"backgroundTag":"config-invalid-choice","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}