OpenBB-finance/OpenBB · error · OpenBBError

No data found for the given parameters. Please check the com

Error message

No data found for the given parameters. Please check the commodity, year, and month.

What it means

Error "No data found for the given parameters. Please check the commodity, year, and month." thrown in OpenBB-finance/OpenBB.

Source

Thrown at openbb_platform/providers/government_us/openbb_government_us/models/commodity_psd_report.py:154

    def extract_data(
        query: GovernmentUsCommodityPsdReportQueryParams,
        credentials: dict[str, Any] | None,
        **kwargs: Any,
    ) -> dict:
        """Extract data from the provider."""
        # pylint: disable=import-outside-toplevel
        from openbb_core.provider.utils.helpers import make_request

        api_commodity = COMMODITIES.get(query.commodity.lower(), query.commodity)
        month = f"{query.month:02d}"
        url = f"https://apps.fas.usda.gov/PSDOnline/CircularDownloader.ashx?year={query.year}&month={month}&commodity={api_commodity}"
        output = b""

        try:
            response = make_request(url)

            if response.status_code == 404 or not response.content:
                raise OpenBBError(
                    ValueError(
                        "No data found for the given parameters. Please check the commodity, year, and month."
                    )
                )

            if response.status_code == 200 and response.content[:4] == b"%PDF":
                output = response.content
            else:
                raise OpenBBError(
                    ValueError(
                        "Failed to retrieve data. Unexpected response from the server."
                        + f" Status code: {response.status_code} -> "
                        + f"Response content: {response.content.decode('utf-8', errors='ignore')}"
                    )
                )
        except Exception as e:
            raise OpenBBError(e) from e

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Check the commodity, year, and month parameters for correctness.
  2. Try a more recent year; reports may not exist for older periods.
  3. Verify the selected commodity publishes a PSD report.

When it happens

Trigger: Thrown at openbb_platform/providers/government_us/openbb_government_us/models/commodity_psd_report.py:154 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/b101f407d286951d. Report an issue: GitHub.