OpenBB-finance/OpenBB · error · OpenBBError

No valid indices found. Must be any of: {list(MORTGAGE_CHOIC

Error message

No valid indices found. Must be any of: {list(MORTGAGE_CHOICES_TO_ID.keys())}

What it means

Error "No valid indices found. Must be any of: {list(MORTGAGE_CHOICES_TO_ID.keys())}" thrown in OpenBB-finance/OpenBB.

Source

Thrown at openbb_platform/providers/fred/openbb_fred/models/mortgage_indices.py:227

        """,
        json_schema_extra={
            "choices": ["chg", "ch1", "pch", "pc1", "pca", "cch", "cca", "log"]
        },
    )

    @field_validator("index", mode="before", check_fields=False)
    @classmethod
    def validate_index(cls, v):
        """Validate index."""
        indices = v.split(",")
        new_indices: list = []
        for index in indices:
            if index in MORTGAGE_CHOICES_TO_ID:
                new_indices.append(index)
            else:
                warn(f"Invalid index '{index}' will be ignored.")
        if not new_indices:
            raise OpenBBError(
                f"No valid indices found. Must be any of: {list(MORTGAGE_CHOICES_TO_ID.keys())}"
            )
        return ",".join(new_indices)


class FredMortgageIndicesData(MortgageIndicesData):
    """FRED Mortgage Indices Data."""


class FredMortgageIndicesFetcher(
    Fetcher[
        FredMortgageIndicesQueryParams,
        list[FredMortgageIndicesData],
    ]
):
    """FRED Mortgage Indices Fetcher."""

    @staticmethod

View on GitHub (pinned to 3e071fcc2c)

Solutions

  1. Choose indices from the listed valid mortgage index choices.
  2. Check spelling and case of the index parameter.

When it happens

Trigger: Thrown at openbb_platform/providers/fred/openbb_fred/models/mortgage_indices.py:227 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/2db7ce1f21154223. Report an issue: GitHub.