{"record":{"id":"a2a51d64c9ff29f5","repo":"HKUDS/Vibe-Trading","slug":"layout-must-be-one-of-panel-layouts-got-layou","errorCode":null,"errorMessage":"layout must be one of {_PANEL_LAYOUTS}, got {layout!r}","messagePattern":"layout must be one of (.+?), got (.+?)","errorType":"exception","errorClass":"PanelIngestError","httpStatus":null,"severity":"error","filePath":"agent/src/entities/ingest.py","lineNumber":1273,"sourceCode":"    Returns:\n        An ``EntityPanel`` ordered by ``(entity_id, date, metric)``. A\n        ``\"long\"`` file with a header but no data rows yields an empty panel,\n        matching ``load_cashflows``.\n\n    Raises:\n        PanelIngestError: If the file is missing, unreadable, or has no\n            header row; the layout cannot be determined or is invalid; a\n            required column or argument is absent; or any cell fails to\n            parse.\n        ValueError: If ``decimal_separator`` is neither ``\".\"`` nor ``\",\"``.\n    \"\"\"\n    if decimal_separator is not None and decimal_separator not in _DECIMAL_SEPARATORS:\n        raise ValueError(\n            f\"decimal_separator must be one of {_DECIMAL_SEPARATORS}, \"\n            f\"got {decimal_separator!r}\"\n        )\n    if layout is not None and layout not in _PANEL_LAYOUTS:\n        raise PanelIngestError(f\"layout must be one of {_PANEL_LAYOUTS}, got {layout!r}\")\n\n    path = Path(path).expanduser()\n    try:\n        header, rows = _read_rows(path, delimiter, encoding)\n    except CashFlowIngestError as exc:\n        raise PanelIngestError(str(exc)) from exc\n\n    resolved_layout = layout or _infer_panel_layout(header, date_format, path)\n\n    if resolved_layout == \"long\":\n        return _load_panel_long(\n            path,\n            header,\n            rows,\n            columns=columns,\n            entity=entity,\n            metric=metric,\n            currency=currency,","sourceCodeStart":1255,"sourceCodeEnd":1291,"githubUrl":"https://github.com/HKUDS/Vibe-Trading/blob/80ffdda44c5c4db0dd84d70e051cca591cea67df/agent/src/entities/ingest.py#L1255-L1291","documentation":"load_panel rejects layout values outside _PANEL_LAYOUTS ('long', 'wide_dates_rows', 'wide_entities_rows') with a PanelIngestError before reading the file.","triggerScenarios":"Calling load_panel(layout='wide') or layout='rows' or any string not in the allowed set.","commonSituations":"Assuming 'wide' is a valid value (the API splits it into wide_dates_rows/wide_entities_rows), or typos from config files.","solutions":["Use one of the printed valid values, e.g. layout='wide_dates_rows' (dates as columns) or layout='wide_entities_rows' (entities as columns)","Omit layout to let the library infer it"],"exampleFix":"# before\npanel = load_panel('p.csv', layout='wide')\n# after\npanel = load_panel('p.csv', layout='wide_dates_rows')","handlingStrategy":"validation","validationCode":"assert layout in (None, 'long', 'wide_dates_rows', 'wide_entities_rows')","typeGuard":null,"tryCatchPattern":"except PanelIngestError as e:\n    if 'layout must be one of' in str(e): pick a valid layout or omit","preventionTips":["Omit layout to use inference","Validate config strings against the allowed set"],"tags":["validation","argument","layout"],"backgroundTag":"invalid-argument-value","analyzedSha":"80ffdda44c5c4db0dd84d70e051cca591cea67df","analyzedAt":"2026-08-28T12:46:38.989Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}