{"record":{"id":"586f9c68009da75b","repo":"HKUDS/Vibe-Trading","slug":"path-layout-layout-r-needs-at-least-one-colum","errorCode":null,"errorMessage":"{path}: layout={layout!r} needs at least one column besides the first (row-label) column. Columns present: {', '.join(header)}","messagePattern":"(.+?): layout=(.+?) needs at least one column besides the first \\(row-label\\) column\\. Columns present: (.+?)","errorType":"exception","errorClass":"PanelIngestError","httpStatus":null,"severity":"error","filePath":"agent/src/entities/ingest.py","lineNumber":1108,"sourceCode":"    \"\"\"\n    if metric is None:\n        raise PanelIngestError(\n            f\"{path}: layout={layout!r} needs metric=... -- a wide table has \"\n            \"nowhere to put a metric label; every cell already shares its \"\n            \"row's and column's identity\"\n        )\n    if currency is None:\n        raise PanelIngestError(\n            f\"{path}: layout={layout!r} needs currency=... -- a wide table \"\n            \"has no currency column, and currency is never defaulted\"\n        )\n    if unit is None:\n        raise PanelIngestError(\n            f\"{path}: layout={layout!r} needs unit=... -- a wide table has \"\n            \"no unit column, and unit is never defaulted\"\n        )\n    if len(header) < 2:\n        raise PanelIngestError(\n            f\"{path}: layout={layout!r} needs at least one column besides \"\n            f\"the first (row-label) column. Columns present: {', '.join(header)}\"\n        )\n\n    row_label_column = header[0]\n    series_columns = list(header[1:])\n\n    column_dates: dict[str, date] = {}\n    if layout == \"wide_entities_rows\":\n        for column_name in series_columns:\n            try:\n                column_dates[column_name] = _parse_panel_date(\n                    column_name, date_format, path, row_number=0\n                )\n            except PanelIngestError as exc:\n                raise PanelIngestError(\n                    f\"{path}: column header {column_name!r} is not a usable \"\n                    f\"date ({exc}); wide_entities_rows requires every column \"","sourceCodeStart":1090,"sourceCodeEnd":1126,"githubUrl":"https://github.com/HKUDS/Vibe-Trading/blob/80ffdda44c5c4db0dd84d70e051cca591cea67df/agent/src/entities/ingest.py#L1090-L1126","documentation":"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.","triggerScenarios":"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).","commonSituations":"Wrong delimiter (whole line becomes one column), empty file, or pointing load_panel at a header-only export.","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"],"exampleFix":"# before\npanel = load_panel('wide.csv', metric='m', currency='USD', unit='u')\n# after\npanel = load_panel('wide.csv', metric='m', currency='USD', unit='u', delimiter=';')","handlingStrategy":"validation","validationCode":"import csv\nwith open(p, newline='') as f:\n    header = next(csv.reader(f))\nassert len(header) >= 2, f'need >=2 columns, got {header}'","typeGuard":null,"tryCatchPattern":"except PanelIngestError as e:\n    if 'at least one column' in str(e): check delimiter/encoding","preventionTips":["Sniff the delimiter before loading","Inspect header count in smoke tests"],"tags":["ingest","csv","wide-layout","delimiter"],"backgroundTag":"schema-validation-failed","analyzedSha":"80ffdda44c5c4db0dd84d70e051cca591cea67df","analyzedAt":"2026-08-28T12:46:38.989Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}