{"record":{"id":"2db7ce1f21154223","repo":"OpenBB-finance/OpenBB","slug":"no-valid-indices-found-must-be-any-of-list-mort","errorCode":null,"errorMessage":"No valid indices found. Must be any of: {list(MORTGAGE_CHOICES_TO_ID.keys())}","messagePattern":"No valid indices found\\. Must be any of: (.+?)","errorType":"exception","errorClass":"OpenBBError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/fred/openbb_fred/models/mortgage_indices.py","lineNumber":227,"sourceCode":"        \"\"\",\n        json_schema_extra={\n            \"choices\": [\"chg\", \"ch1\", \"pch\", \"pc1\", \"pca\", \"cch\", \"cca\", \"log\"]\n        },\n    )\n\n    @field_validator(\"index\", mode=\"before\", check_fields=False)\n    @classmethod\n    def validate_index(cls, v):\n        \"\"\"Validate index.\"\"\"\n        indices = v.split(\",\")\n        new_indices: list = []\n        for index in indices:\n            if index in MORTGAGE_CHOICES_TO_ID:\n                new_indices.append(index)\n            else:\n                warn(f\"Invalid index '{index}' will be ignored.\")\n        if not new_indices:\n            raise OpenBBError(\n                f\"No valid indices found. Must be any of: {list(MORTGAGE_CHOICES_TO_ID.keys())}\"\n            )\n        return \",\".join(new_indices)\n\n\nclass FredMortgageIndicesData(MortgageIndicesData):\n    \"\"\"FRED Mortgage Indices Data.\"\"\"\n\n\nclass FredMortgageIndicesFetcher(\n    Fetcher[\n        FredMortgageIndicesQueryParams,\n        list[FredMortgageIndicesData],\n    ]\n):\n    \"\"\"FRED Mortgage Indices Fetcher.\"\"\"\n\n    @staticmethod","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/fred/openbb_fred/models/mortgage_indices.py#L209-L245","documentation":"Error \"No valid indices found. Must be any of: {list(MORTGAGE_CHOICES_TO_ID.keys())}\" thrown in OpenBB-finance/OpenBB.","triggerScenarios":"Thrown at openbb_platform/providers/fred/openbb_fred/models/mortgage_indices.py:227 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Choose indices from the listed valid mortgage index choices.","Check spelling and case of the index parameter."],"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"}