HKUDS/Vibe-Trading · error · PanelIngestError

{path} row {row_number}: {row_label_column!r} is blank

Error message

{path} row {row_number}: {row_label_column!r} is blank

What it means

In wide layouts the first column is the row label (entity or date); a row with data but a blank first cell is rejected with its 1-based row number because its identity would be unknown.

Source

Thrown at agent/src/entities/ingest.py:1139

                    column_name, date_format, path, row_number=0
                )
            except PanelIngestError as exc:
                raise PanelIngestError(
                    f"{path}: column header {column_name!r} is not a usable "
                    f"date ({exc}); wide_entities_rows requires every column "
                    "after the first to be a date, or pass layout='long' "
                    "with columns=... instead"
                ) from exc

    observations: list[PanelObservation] = []
    for offset, row in enumerate(rows):
        row_number = offset + 1
        if all(not (value or "").strip() for value in row.values()):
            continue  # trailing blank line

        row_label_raw = (row.get(row_label_column) or "").strip()
        if not row_label_raw:
            raise PanelIngestError(f"{path} row {row_number}: {row_label_column!r} is blank")

        row_date = (
            _parse_panel_date(row_label_raw, date_format, path, row_number)
            if layout == "wide_dates_rows"
            else None
        )
        row_entity = row_label_raw if layout == "wide_entities_rows" else None

        for column_name in series_columns:
            raw_value = row.get(column_name, "")
            if not (raw_value or "").strip():
                continue  # hole in the grid: no observation, not zero

            value = _parse_panel_amount(raw_value, path, row_number, decimal_separator)
            entity_id = column_name.strip() if layout == "wide_dates_rows" else row_entity
            obs_date = row_date if layout == "wide_dates_rows" else column_dates[column_name]

            metadata = {"source_file": str(path), "source_row": row_number}

View on GitHub (pinned to 80ffdda44c)

Solutions

  1. Open the file at the reported row and fill in the first-column label
  2. Strip BOM/trailing whitespace issues from the first column
  3. Re-export the spreadsheet avoiding blank leading cells
Defensive patterns

Strategy: validation

Validate before calling

for i, row in enumerate(rows, 1):
    if any((v or '').strip() for v in row.values()) and not (row[first_col] or '').strip():
        print(f'row {i}: blank label')

Try / catch

except PanelIngestError as e:
    if 'is blank' in str(e): fix that row's first cell

Prevention

When it happens

Trigger: A CSV row where the first cell is empty/whitespace but other cells have content, while loading a wide layout.

Common situations: Stray space characters in the label column, merged-cell spreadsheet exports, or hand-edited CSVs with missing labels.

Understand the failure class

Background: "Missing required field" and "field is required" errors: why libraries reject payloads that omit mandatory fields — this error's family across 20 libraries.

Related errors


AI-assisted analysis of HKUDS/Vibe-Trading@80ffdda44c (2026-08-28). Data as JSON: /api/errors/6bc9fa06438f8552. Report an issue: GitHub.