{"record":{"id":"2a2db7013f683578","repo":"larksuite/cli","slug":"csv-get-truncated-the-scan-range-at-actual-range","errorCode":null,"errorMessage":"+csv-get truncated the scan range at {actual_range}; narrow --range before detecting subtables","messagePattern":"\\+csv-get truncated the scan range at (.+?); narrow --range before detecting subtables","errorType":"exception","errorClass":"LarkCliError","httpStatus":null,"severity":"error","filePath":"skills/lark-sheets/scripts/lark_detect_subtables.py","lineNumber":460,"sourceCode":"        )\n    )\n    csv_data = envelope_data(\n        run_sheets(\n            \"+csv-get\",\n            url=args.url,\n            spreadsheet_token=args.spreadsheet_token,\n            **locator,\n            flags={\n                \"range\": scan_range,\n                \"max_chars\": args.max_chars,\n                \"skip_hidden\": True if args.skip_hidden else None,\n            },\n            timeout=args.timeout,\n        )\n    )\n    actual_range = str(csv_data.get(\"actual_range\") or scan_range)\n    if csv_data.get(\"has_more\"):\n        raise LarkCliError(\n            f\"+csv-get truncated the scan range at {actual_range}; narrow --range before detecting subtables\"\n        )\n\n    grid = parse_annotated_csv(\n        csv_data.get(\"annotated_csv\", \"\"),\n        csv_data.get(\"col_indices\"),\n        csv_data.get(\"row_indices\"),\n        actual_range,\n    )\n    if grid.row_numbers_inferred:\n        warnings.append(\"CSV row numbers were inferred from the requested range\")\n    hidden_rows_raw = layout.get(\"hidden_rows\") or []\n    hidden_row_indexes = {\n        int(value) + 1\n        for value in hidden_rows_raw\n        if isinstance(value, (int, str)) and str(value).isdigit()\n    }\n    hidden_columns_raw = layout.get(\"hidden_cols\") or layout.get(\"hidden_columns\") or []","sourceCodeStart":442,"sourceCodeEnd":478,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/skills/lark-sheets/scripts/lark_detect_subtables.py#L442-L478","documentation":"After staging and cropping the suite, syncSuite installs the local suite directory via runner.InstallLocalSuite. A nil result or a result with Err set aborts with this message plus resultDetail(installResult). The runner's detail carries the true root cause.","triggerScenarios":"Running a suite-mode skills sync where the install of the cropped lark-suite directory fails: the runner's install command (e.g. copying into the global skills dir) hits permission errors, a full disk, or a non-zero exit from the underlying installer.","commonSituations":"Installing into a global ~/.agents/skills (or agent-managed) directory without write permissions; agent CLI owning the skills directory is missing or misconfigured; antivirus/OS blocking the copy; disk quota exceeded.","solutions":["Read the detail after 'install cropped lark-suite failed:' to identify the runner's underlying error.","Check write permissions on the target global skills directory and fix ownership/permissions (chmod/chown).","Ensure the agent/host that owns the skills directory is installed and reachable, then retry the sync.","Free disk space if the install failed partway through writing files."],"exampleFix":"// before\nlark-cli skills update --layout suite   # fails: permission denied on ~/.agents/skills\n// after\nsudo chown -R \"$USER\" ~/.agents && lark-cli skills update --layout suite","handlingStrategy":"validation","validationCode":"// Pre-flight: writable global skills dir?\ndir := filepath.Join(home, \".agents\", \"skills\")\nif err := os.MkdirAll(dir, 0o755); err != nil {\n    return fmt.Errorf(\"skills dir not writable: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"if err := syncLayout(...); err != nil && strings.Contains(err.Error(), \"install cropped lark-suite failed\") {\n    // read resultDetail for the runner's cause; fix permissions/ownership, then retry\n}","preventionTips":["Verify write access to the global skills directory before installing.","Ensure the owning agent CLI is installed and configured for the target machine.","Watch disk quota on the home volume for large installs."],"tags":["go","filesystem","installation","skills-sync"],"backgroundTag":"skill-install-failed","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"}