HKUDS/Vibe-Trading · error · PanelIngestError
{path}: layout={layout!r} needs at least one column besides
Error message
{path}: layout={layout!r} needs at least one column besides the first (row-label) column. Columns present: {', '.join(header)} What it means
A wide panel needs at least one data column besides the first row-label column; this error fires when the file has only a single column, listing the columns actually found to aid diagnosis.
Source
Thrown at agent/src/entities/ingest.py:1108
"""
if metric is None:
raise PanelIngestError(
f"{path}: layout={layout!r} needs metric=... -- a wide table has "
"nowhere to put a metric label; every cell already shares its "
"row's and column's identity"
)
if currency is None:
raise PanelIngestError(
f"{path}: layout={layout!r} needs currency=... -- a wide table "
"has no currency column, and currency is never defaulted"
)
if unit is None:
raise PanelIngestError(
f"{path}: layout={layout!r} needs unit=... -- a wide table has "
"no unit column, and unit is never defaulted"
)
if len(header) < 2:
raise PanelIngestError(
f"{path}: layout={layout!r} needs at least one column besides "
f"the first (row-label) column. Columns present: {', '.join(header)}"
)
row_label_column = header[0]
series_columns = list(header[1:])
column_dates: dict[str, date] = {}
if layout == "wide_entities_rows":
for column_name in series_columns:
try:
column_dates[column_name] = _parse_panel_date(
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 "View on GitHub (pinned to 80ffdda44c)
Solutions
- Check the printed column list — if it shows one giant column, pass the correct delimiter=
- Ensure the file actually contains a wide grid with ≥2 columns
- Use layout='long' with columns=... if the data is actually long-format
Example fix
# before
panel = load_panel('wide.csv', metric='m', currency='USD', unit='u')
# after
panel = load_panel('wide.csv', metric='m', currency='USD', unit='u', delimiter=';') Defensive patterns
Strategy: validation
Validate before calling
import csv
with open(p, newline='') as f:
header = next(csv.reader(f))
assert len(header) >= 2, f'need >=2 columns, got {header}' Try / catch
except PanelIngestError as e:
if 'at least one column' in str(e): check delimiter/encoding Prevention
- Sniff the delimiter before loading
- Inspect header count in smoke tests
When it happens
Trigger: load_panel on a file whose header has fewer than two columns while layout resolves to wide (e.g. a one-column CSV or an empty-ish file misread as wide).
Common situations: Wrong delimiter (whole line becomes one column), empty file, or pointing load_panel at a header-only export.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- {path} row {row_number}: {row_label_column!r} is blank
- {path}: unknown column mapping {field_name!r}; mappable fiel
- {path}: mapped column {source_name!r} for field {field_name!
- {path} row {row_number}: amount is blank. A missing amount m
- {path} row {row_number}: unit is blank and no unit=... fallb
AI-assisted analysis of HKUDS/Vibe-Trading@80ffdda44c (2026-08-28).
Data as JSON: /api/errors/586f9c68009da75b.
Report an issue: GitHub.