{"record":{"id":"36b7396e871459eb","repo":"kovidgoyal/kitty","slug":"invalid-cursor-shape-allowed-values-are","errorCode":null,"errorMessage":"Invalid cursor shape: {} allowed values are {}","messagePattern":"Invalid cursor shape: (.+?) allowed values are (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"kitty/options/utils.py","lineNumber":644,"sourceCode":"        return None\n    return to_color(x)\n\n\ncshapes = {'block': CURSOR_BLOCK, 'beam': CURSOR_BEAM, 'underline': CURSOR_UNDERLINE}\ncshapes_unfocused = {\n    'block': CURSOR_BLOCK,\n    'beam': CURSOR_BEAM,\n    'underline': CURSOR_UNDERLINE,\n    'hollow': CURSOR_HOLLOW,\n    'unchanged': NO_CURSOR_SHAPE,\n}\n\n\ndef to_cursor_shape(x: str) -> int:\n    try:\n        return cshapes[x.lower()]\n    except KeyError:\n        raise ValueError('Invalid cursor shape: {} allowed values are {}'.format(x, ', '.join(cshapes)))\n\n\ndef to_cursor_unfocused_shape(x: str) -> int:\n    try:\n        return cshapes_unfocused[x.lower()]\n    except KeyError:\n        raise ValueError('Invalid unfocused cursor shape: {} allowed values are {}'.format(x, ', '.join(cshapes_unfocused)))\n\n\ndef cursor_trail_decay(x: str) -> tuple[float, float]:\n    fast, slow = map(positive_float, x.split())\n    slow = max(slow, fast)\n    return fast, slow\n\n\ndef cursor_trail_start_threshold(x: str) -> tuple[int, int]:\n    parts = x.split()\n    if len(parts) == 1:","sourceCodeStart":626,"sourceCodeEnd":662,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/utils.py#L626-L662","documentation":"to_cursor_shape raises this when the cursor_shape option value is not in the cshapes mapping: block, beam, underline (and newer variants like hollow_block in recent kitty versions). It formats the bad value with the list of allowed shapes.","triggerScenarios":"cursor_shape vertical, cursor_shape ibeam, or any typo in kitty.conf / remote-control set-option calls.","commonSituations":"Using terminology from other terminals (i-beam, vertical bar) instead of kitty's 'beam'; version differences in allowed shapes.","solutions":["Use block, beam, or underline","For unfocused cursor use cursor_shape_unfocused with the same values"],"exampleFix":"# before\ncursor_shape i-beam\n# after\ncursor_shape beam","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"def is_cursor_shape(x: str) -> bool:\n    return x.lower() in {'block','beam','underline'}","tryCatchPattern":null,"preventionTips":["Only use block/beam/underline","Test config with `kitty --debug-config`"],"tags":["kitty","config","cursor"],"backgroundTag":"config-value-validation-failed","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}