{"record":{"id":"b101f407d286951d","repo":"OpenBB-finance/OpenBB","slug":"no-data-found-for-the-given-parameters-please-che","errorCode":null,"errorMessage":"No data found for the given parameters. Please check the commodity, year, and month.","messagePattern":"No data found for the given parameters\\. Please check the commodity, year, and month\\.","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/government_us/openbb_government_us/models/commodity_psd_report.py","lineNumber":154,"sourceCode":"    def extract_data(\n        query: GovernmentUsCommodityPsdReportQueryParams,\n        credentials: dict[str, Any] | None,\n        **kwargs: Any,\n    ) -> dict:\n        \"\"\"Extract data from the provider.\"\"\"\n        # pylint: disable=import-outside-toplevel\n        from openbb_core.provider.utils.helpers import make_request\n\n        api_commodity = COMMODITIES.get(query.commodity.lower(), query.commodity)\n        month = f\"{query.month:02d}\"\n        url = f\"https://apps.fas.usda.gov/PSDOnline/CircularDownloader.ashx?year={query.year}&month={month}&commodity={api_commodity}\"\n        output = b\"\"\n\n        try:\n            response = make_request(url)\n\n            if response.status_code == 404 or not response.content:\n                raise OpenBBError(\n                    ValueError(\n                        \"No data found for the given parameters. Please check the commodity, year, and month.\"\n                    )\n                )\n\n            if response.status_code == 200 and response.content[:4] == b\"%PDF\":\n                output = response.content\n            else:\n                raise OpenBBError(\n                    ValueError(\n                        \"Failed to retrieve data. Unexpected response from the server.\"\n                        + f\" Status code: {response.status_code} -> \"\n                        + f\"Response content: {response.content.decode('utf-8', errors='ignore')}\"\n                    )\n                )\n        except Exception as e:\n            raise OpenBBError(e) from e\n","sourceCodeStart":136,"sourceCodeEnd":172,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/government_us/openbb_government_us/models/commodity_psd_report.py#L136-L172","documentation":"Error \"No data found for the given parameters. Please check the commodity, year, and month.\" thrown in OpenBB-finance/OpenBB.","triggerScenarios":"Thrown at openbb_platform/providers/government_us/openbb_government_us/models/commodity_psd_report.py:154 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the commodity, year, and month parameters for correctness.","Try a more recent year; reports may not exist for older periods.","Verify the selected commodity publishes a PSD report."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}