{"record":{"id":"61c5c0368bf17511","repo":"kovidgoyal/kitty","slug":"invalid-box-drawing-scale-must-have-four-entries","errorCode":null,"errorMessage":"Invalid box_drawing scale, must have four entries","messagePattern":"Invalid box_drawing scale, must have four entries","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"kitty/options/utils.py","lineNumber":620,"sourceCode":"            else:\n                key = x\n\n    return SingleKey(mods, is_native, key or 0)\n\n\ndef to_font_size(x: str) -> float:\n    return max(MINIMUM_FONT_SIZE, float(x))\n\n\ndef disable_ligatures(x: str) -> int:\n    cmap = {'never': 0, 'cursor': 1, 'always': 2}\n    return cmap.get(x.lower(), 0)\n\n\ndef box_drawing_scale(x: str) -> tuple[float, float, float, float]:\n    ans = tuple(float(q.strip()) for q in x.split(','))\n    if len(ans) != 4:\n        raise ValueError('Invalid box_drawing scale, must have four entries')\n    return ans[0], ans[1], ans[2], ans[3]\n\n\ndef cursor_text_color(x: str) -> Color | None:\n    if x.lower() == 'background':\n        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","sourceCodeStart":602,"sourceCodeEnd":638,"githubUrl":"https://github.com/kovidgoyal/kitty/blob/6d5d0c440603ad9bdf6dcd599f73f6dde21acb44/kitty/options/utils.py#L602-L638","documentation":"box_drawing_scale validator raises this when the option value does not split into exactly four comma-separated floats. kitty uses four thresholds (0.001, 1.0, 1.95, 2.75 by default) to decide when to use pure-font glyphs for box drawing.","triggerScenarios":"Setting box_drawing_scale 0.001 1.0 (spaces, wrong count), or 0.001,1.0,1.95 (three values), or non-numeric entries (which fail float() first with ValueError).","commonSituations":"Copying a three-value example from an old blog, using spaces instead of commas, editing kitty.conf by hand.","solutions":["Provide exactly four comma-separated floats","Restore the default: box_drawing_scale 0.001,1.0,1.95,2.75"],"exampleFix":"# before\nbox_drawing_scale 0.001 1.0 1.95 2.75\n# after\nbox_drawing_scale 0.001,1.0,1.95,2.75","handlingStrategy":"validation","validationCode":"def valid_bds(x: str) -> bool:\n    parts = [p.strip() for p in x.split(',')]\n    return len(parts) == 4 and all(_is_float(p) for p in parts)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always four comma-separated floats","Copy the documented default line verbatim"],"tags":["kitty","config","rendering"],"backgroundTag":"config-value-validation-failed","analyzedSha":"6d5d0c440603ad9bdf6dcd599f73f6dde21acb44","analyzedAt":"2026-08-27T14:20:20.142Z","schemaVersion":2},"datasetVersion":"2026-08-27T19:17:21.184Z"}