{"record":{"id":"830a29a11fd686f5","repo":"HKUDS/Vibe-Trading","slug":"path-layout-layout-r-needs-currency-a","errorCode":null,"errorMessage":"{path}: layout={layout!r} needs currency=... -- a wide table has no currency column, and currency is never defaulted","messagePattern":"(.+?): layout=(.+?) needs currency=\\.\\.\\. -- a wide table has no currency column, and currency is never defaulted","errorType":"exception","errorClass":"PanelIngestError","httpStatus":null,"severity":"error","filePath":"agent/src/entities/ingest.py","lineNumber":1098,"sourceCode":"        decimal_separator: Declared decimal separator, or ``None`` to infer.\n\n    Returns:\n        An ``EntityPanel``.\n\n    Raises:\n        PanelIngestError: If ``metric``/``currency``/``unit`` is missing, the\n            file has fewer than two columns, a column header in\n            ``wide_entities_rows`` is not a usable date, or a cell fails to\n            parse.\n    \"\"\"\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] = {}","sourceCodeStart":1080,"sourceCodeEnd":1116,"githubUrl":"https://github.com/HKUDS/Vibe-Trading/blob/80ffdda44c5c4db0dd84d70e051cca591cea67df/agent/src/entities/ingest.py#L1080-L1116","documentation":"Wide layouts have no currency column, and currency is never defaulted, so load_panel requires an explicit currency= argument when the inferred/explicit layout is wide.","triggerScenarios":"Calling load_panel on a wide table (or with layout='wide_*') without currency='...'.","commonSituations":"Wide spreadsheets of financial data where currency was implicit in a title cell or filename.","solutions":["Pass currency='USD' to load_panel","Or convert the file to long layout with a currency column"],"exampleFix":"# before\npanel = load_panel('wide.csv', metric='revenue')\n# after\npanel = load_panel('wide.csv', metric='revenue', currency='USD')","handlingStrategy":"validation","validationCode":"if layout_is_wide and currency is None: currency = 'USD'  # decide explicitly before calling","typeGuard":null,"tryCatchPattern":"except PanelIngestError as e:\n    if 'needs currency=' in str(e): retry with explicit currency","preventionTips":["Treat metric/currency/unit as a required triple for wide loads"],"tags":["ingest","panel","wide-layout","currency"],"backgroundTag":"missing-required-argument","analyzedSha":"80ffdda44c5c4db0dd84d70e051cca591cea67df","analyzedAt":"2026-08-28T12:46:38.989Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}