{"record":{"id":"be75126e769ba553","repo":"OpenBB-finance/OpenBB","slug":"earliest-possible-year-is-1960","errorCode":null,"errorMessage":"Earliest possible year is 1960.","messagePattern":"Earliest possible year is 1960\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/government_us/openbb_government_us/models/commodity_psd_data.py","lineNumber":306,"sourceCode":"            and country not in COUNTRY_CHOICES\n        ]\n\n        if invalid_countries:\n            raise ValueError(\n                f\"Invalid country code(s) '{', '.join(invalid_countries)}'. Valid country codes are: \"\n                + \", \".join(\n                    sorted(list(COUNTRY_CHOICES)),\n                )\n            )\n\n        return v\n\n    @field_validator(\"start_year\", mode=\"before\", check_fields=False)\n    @classmethod\n    def _validate_start_year(cls, v):\n        \"\"\"Validate start_year.\"\"\"\n        if v and v < 1960:\n            raise ValueError(\"Earliest possible year is 1960.\")\n        return v\n\n    @model_validator(mode=\"after\")\n    def _validate_model(self):\n        \"\"\"Validate that start_year is less than or equal to end_year.\"\"\"\n        report_id = getattr(self, \"report_id\", None)\n        commodity = getattr(self, \"commodity\", None)\n\n        if not report_id and not commodity:\n            raise ValueError(\n                \"Either 'report_id' or 'commodity' must be provided.\"\n                + \" If both are provided, 'commodity' takes precedence.\"\n            )\n\n        return self\n\n\nclass GovernmentUsCommodityPsdData(CommodityPsdData):","sourceCodeStart":288,"sourceCodeEnd":324,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/government_us/openbb_government_us/models/commodity_psd_data.py#L288-L324","documentation":"Error \"Earliest possible year is 1960.\" thrown in OpenBB-finance/OpenBB.","triggerScenarios":"Thrown at openbb_platform/providers/government_us/openbb_government_us/models/commodity_psd_data.py:306 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set start year to 1960 or later.","Adjust the year range to fall within available PSD data coverage."],"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"}