{"record":{"id":"e8b387417baa4cb9","repo":"HKUDS/Vibe-Trading","slug":"path-column-header-column-name-r-is-not-a-usa","errorCode":null,"errorMessage":"{path}: column header {column_name!r} is not a usable date ({exc}); wide_entities_rows requires every column after the first to be a date, or pass layout='long' with columns=... instead","messagePattern":"(.+?): column header (.+?) is not a usable date \\((.+?)\\); wide_entities_rows requires every column after the first to be a date, or pass layout='long' with columns=\\.\\.\\. instead","errorType":"exception","errorClass":"PanelIngestError","httpStatus":null,"severity":"error","filePath":"agent/src/entities/ingest.py","lineNumber":1124,"sourceCode":"        )\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 \"\n                    \"after the first to be a date, or pass layout='long' \"\n                    \"with columns=... instead\"\n                ) from exc\n\n    observations: list[PanelObservation] = []\n    for offset, row in enumerate(rows):\n        row_number = offset + 1\n        if all(not (value or \"\").strip() for value in row.values()):\n            continue  # trailing blank line\n\n        row_label_raw = (row.get(row_label_column) or \"\").strip()\n        if not row_label_raw:\n            raise PanelIngestError(f\"{path} row {row_number}: {row_label_column!r} is blank\")\n\n        row_date = (\n            _parse_panel_date(row_label_raw, date_format, path, row_number)","sourceCodeStart":1106,"sourceCodeEnd":1142,"githubUrl":"https://github.com/HKUDS/Vibe-Trading/blob/80ffdda44c5c4db0dd84d70e051cca591cea67df/agent/src/entities/ingest.py#L1106-L1142","documentation":"In wide_entities_rows layout every column after the first must be a date header; this wraps the date-parse failure and suggests either fixing the headers or using layout='long' with columns=... instead.","triggerScenarios":"load_panel inferring/explicitly using 'wide_entities_rows' where a column header (e.g. 'Total' or 'Q1 2024') is not parseable as a date with the given date_format.","commonSituations":"Wide tables with summary columns ('Total', 'YoY'), or non-ISO date headers while relying on inference.","solutions":["Pass an explicit date_format matching the headers (e.g. '%b %Y')","Remove/ignore non-date summary columns from the file","Switch to layout='long' with columns=... to map columns explicitly"],"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', date_format='%b %Y')","handlingStrategy":"try-catch","validationCode":"for h in header[1:]:\n    try: date.fromisoformat(h)\n    except ValueError: print('non-date column:', h)","typeGuard":null,"tryCatchPattern":"except PanelIngestError as e:\n    if 'not a usable date' in str(e): retry with date_format=... or layout='long'","preventionTips":["Use ISO dates in headers or pass date_format","Drop summary columns before ingest"],"tags":["ingest","date-parsing","wide-layout"],"backgroundTag":"date-parse-failed","analyzedSha":"80ffdda44c5c4db0dd84d70e051cca591cea67df","analyzedAt":"2026-08-28T12:46:38.989Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}