{"record":{"id":"00390f1756f011bf","repo":"larksuite/cli","slug":"invalid-column-column-r","errorCode":null,"errorMessage":"Invalid column: {column!r}","messagePattern":"Invalid column: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"skills/lark-sheets/scripts/lark_chart_layout_check.py","lineNumber":41,"sourceCode":"    LarkCliError,\n    emit_error,\n    envelope_data,\n    resolve_target_sheets,\n    run_sheets,\n    sheet_identifier,\n    sheet_title,\n)\n\nACTION = \"chart_layout_check\"\nDEFAULT_COLUMN_WIDTH = 105.0\nDEFAULT_ROW_HEIGHT = 27.0\n\n\ndef column_to_index(column: str) -> int:\n    value = 0\n    text = str(column).strip().upper()\n    if not text or not text.isalpha():\n        raise ValueError(f\"Invalid column: {column!r}\")\n    for char in text:\n        value = value * 26 + ord(char) - ord(\"A\") + 1\n    return value - 1\n\n\ndef index_to_column(index: int) -> str:\n    if index < 0:\n        raise ValueError(f\"Invalid column index: {index}\")\n    chars: list[str] = []\n    value = index + 1\n    while value:\n        value, remainder = divmod(value - 1, 26)\n        chars.append(chr(ord(\"A\") + remainder))\n    return \"\".join(reversed(chars))\n\n\ndef _span_bounds(span: str, *, columns: bool) -> tuple[int, int]:\n    start, separator, end = str(span).partition(\":\")","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/skills/lark-sheets/scripts/lark_chart_layout_check.py#L23-L59","documentation":"This error is returned by skillref.New while validating the From side of a skill reference remap: the source reference string fails skillref.Parse. It wraps ErrInvalidRemap so callers can classify the mapping as an invalid SkillsOverlay. The parse error itself (with the exact syntax problem) is chained as the cause.","triggerScenarios":"Calling skillref.New(content, mappings) with a Mapping whose From.Ref cannot be parsed into a canonical skill reference (bad 'skill' or 'skill/path' syntax, e.g. empty skill name, invalid characters, malformed path).","commonSituations":"Hand-edited overlay/config files declaring remaps with typos in the source skill name; programmatically built Mapping structs populated from loose config maps without validation; renames of skills in the CLI that leave stale references in user configs.","solutions":["Fix the source reference string in the overlay/config so it matches the canonical 'skill' or 'skill/path' form accepted by skillref.Parse.","Run skillref.Parse on the From string before building the Mapping to get the precise syntax error and correct it.","If skills were renamed or removed in a CLI upgrade, update the stale source reference to the new skill name."],"exampleFix":"// before\nMapping{From: Ref-from-string \"auth/hard ref.md\", To: toRef}\n// after: use canonical form 'skill/path'\nmapping := skillref.Mapping{From: mustParse(\"auth/login\"), To: mustParse(\"auth/login-v2\")}\nfunc mustParse(s string) skillref.Ref { r, err := skillref.Parse(s); if err != nil { panic(err) }; return r }","handlingStrategy":"validation","validationCode":"func validateSource(s string) error {\n    _, err := skillref.Parse(s)\n    if err != nil {\n        return fmt.Errorf(\"invalid remap source %q: %w\", s, err)\n    }\n    return nil\n}","typeGuard":"func isValidRef(s string) bool { _, err := skillref.Parse(s); return err == nil }","tryCatchPattern":null,"preventionTips":["Always pass From/To through skillref.Parse when building Mappings from config strings.","Keep remap sources in canonical 'skill' or 'skill/path' form in config files.","Re-validate overlay configs after upgrading the CLI in case reference grammar or skill names changed."],"tags":["go","validation","config","skill-reference"],"backgroundTag":"invalid-skill-reference-mapping","analyzedSha":"7fd6ef3c07182257ce776cdc5a614e122d5bd4b3","analyzedAt":"2026-09-04T21:17:44.649Z","contentChangedAt":"2026-09-04T21:17:44.649Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}