OpenBB-finance/OpenBB · error · OpenBBError
Data is only available from 2006 onwards.
Error message
Data is only available from 2006 onwards.
What it means
Error "Data is only available from 2006 onwards." thrown in OpenBB-finance/OpenBB.
Source
Thrown at openbb_platform/providers/government_us/openbb_government_us/models/commodity_psd_report.py:90
"multiple_items_allowed": False,
"choices": list(COMMODITIES),
"x-widget_config": {
"row": 1,
"description": "Commodity for the report to retrieve.",
"options": [
{"value": commodity, "label": commodity.replace("_", " ").title()}
for commodity in COMMODITIES
],
},
},
}
@field_validator("year", mode="before", check_fields=False)
@classmethod
def _validate_year(cls, v):
"""Validate year is >= 2006."""
if v < 2006:
raise OpenBBError(ValueError("Data is only available from 2006 onwards."))
return v
@field_validator("commodity", mode="before", check_fields=False)
@classmethod
def _validate_commodity(cls, v):
"""Validate commodity is in the list."""
if v.lower() not in COMMODITIES:
raise OpenBBError(
ValueError(
f"Commodity '{v}' is not supported. "
+ "Please choose from the available commodities -> "
+ f"{', '.join(COMMODITIES.keys())}"
)
)
return v.lower()
class GovernmentUsCommodityPsdReportData(CommodityPsdReportData):View on GitHub (pinned to 3e071fcc2c)
Solutions
- Set the year to 2006 or later.
- Adjust the date range to within available PSD report coverage.
When it happens
Trigger: Thrown at openbb_platform/providers/government_us/openbb_government_us/models/commodity_psd_report.py:90 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of OpenBB-finance/OpenBB@3e071fcc2c (2026-08-14).
Data as JSON: /api/errors/3ede13e7d85573bd.
Report an issue: GitHub.