{"record":{"id":"495d52f02a8ef225","repo":"OpenBB-finance/OpenBB","slug":"index-index-not-found-in-available-indexes-fil","errorCode":null,"errorMessage":"Index {index} not found in available indexes: {filenames}","messagePattern":"Index (.+?) not found in available indexes: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"openbb_platform/providers/famafrench/openbb_famafrench/utils/helpers.py","lineNumber":572,"sourceCode":"            )\n        url = BASE_URL + COUNTRY_PORTFOLIOS_URLS[\"dividends\" if dividends else \"ex\"]\n        index = COUNTRY_PORTFOLIO_FILES[country]\n\n    response = download_international_portfolios(url)\n\n    with zipfile.ZipFile(BytesIO(response.content)) as f:\n        filenames = f.namelist()\n\n        if index in filenames:\n            try:\n                with f.open(index) as file:\n                    data = file.read().decode(\"utf-8\")\n            except UnicodeDecodeError:\n                # Fallback to latin-1 encoding if utf-8 fails\n                with f.open(index) as file:\n                    data = file.read().decode(\"latin-1\")\n        else:\n            raise ValueError(\n                f\"Index {index} not found in available indexes: {filenames}\"\n            )\n\n    return data\n\n\ndef process_international_portfolio_data(tables: list, dividends: bool = True) -> tuple:\n    \"\"\"Convert parsed table dictionaries to pandas DataFrames with proper multi-index columns.\n\n    Note: Not intended for direct use, this function is called by `get_international_portfolio`.\n    \"\"\"\n    # pylint: disable=import-outside-toplevel\n    import re  # noqa\n    import warnings\n    from pandas import DataFrame, MultiIndex\n\n    dataframes: list = []\n    metadata: list = []","sourceCodeStart":554,"sourceCodeEnd":590,"githubUrl":"https://github.com/OpenBB-finance/OpenBB/blob/3e071fcc2cd9f891cac6040ae60296dba76dab46/openbb_platform/providers/famafrench/openbb_famafrench/utils/helpers.py#L554-L590","documentation":"Raised by get_international_portfolio_data after downloading the international portfolios zip: the expected member filename (derived from the index or country mapping) was not among the zip's entries. This is a downstream consistency check — the URL mapping and the archive contents disagreed.","triggerScenarios":"INTERNATIONAL_INDEX_PORTFOLIO_FILES/COUNTRY_PORTFOLIO_FILES maps a label to a filename (e.g. 'Developed_ex.VW_Cap.txt') that the freshly downloaded zip no longer contains.","commonSituations":"Upstream Fama/French renamed or removed files inside the dividends or ex-dividends archive; provider mapping out of date relative to the live site; dividends=True selecting the 'dividends' zip whose filenames differ from the expected one.","solutions":["Retry with dividends=False (or True) — the two archives have different member names.","Manually download the zip URL (BASE_URL + INTERNATIONAL_INDEX_PORTFOLIOS_URLS[...]) and list its contents to see the real filenames.","Update openbb-famafrench; if still broken, open a provider issue with the zip's namelist.","Toggling the other dimension (country instead of index) can confirm the archive itself is fine."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    res = obb.economy.famafrench.international_index_returns(index='Developed', dividends=False)\nexcept ValueError as e:\n    if 'not found in available indexes' in str(e):\n        res = obb.economy.famafrench.international_index_returns(index='Developed', dividends=True)\n    else:\n        raise","preventionTips":["Try both dividends=True and dividends=False — the two archives have different member filenames.","Pin the provider version you validated against; upstream zip renames surface here first."],"tags":["famafrench","upstream-change","zip","validation"],"backgroundTag":null,"analyzedSha":"3e071fcc2cd9f891cac6040ae60296dba76dab46","analyzedAt":"2026-08-14T23:40:48.960Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}