{"record":{"id":"d379fb5c24a7b84b","repo":"exo-explore/exo","slug":"failed-to-fetch-file-list-for-model-id-revisio","errorCode":null,"errorMessage":"Failed to fetch file list for {model_id=} {revision=} {path=} {recursive=}","messagePattern":"Failed to fetch file list for (.+?) (.+?) (.+?) (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/exo/download/download_utils.py","lineNumber":482,"sourceCode":"            raise\n        except HuggingFaceRateLimitError as e:\n            if attempt == n_attempts - 1:\n                raise\n            sleep_for = e.retry_after if e.retry_after is not None else 2.0**attempt\n            sleep_for = min(sleep_for, _RATE_LIMIT_MAX_SLEEP_SECS) + random.uniform(\n                0, 1\n            )\n            logger.warning(\n                f\"Rate limited by HuggingFace fetching file list for {model_id}; \"\n                f\"sleeping {sleep_for:.1f}s before retry {attempt + 2}/{n_attempts}\"\n            )\n            await asyncio.sleep(sleep_for)\n        except Exception as e:\n            on_connection_lost()\n            if attempt == n_attempts - 1:\n                raise e\n            await asyncio.sleep(2.0**attempt + random.uniform(0, 1))\n    raise Exception(\n        f\"Failed to fetch file list for {model_id=} {revision=} {path=} {recursive=}\"\n    )\n\n\nasync def _fetch_file_list(\n    model_id: ModelId, revision: str = \"main\", path: str = \"\", recursive: bool = False\n) -> list[FileListEntry]:\n    api_url = f\"{get_hf_endpoint()}/api/models/{model_id}/tree/{revision}\"\n    url = f\"{api_url}/{path}\" if path else api_url\n    # ?recursive=true returns the whole subtree in one request\n    if recursive:\n        url = f\"{url}?recursive=true\"\n\n    headers = await get_download_headers()\n    async with (\n        create_http_session(timeout_profile=\"short\") as session,\n        session.get(url, headers=headers) as response,\n    ):","sourceCodeStart":464,"sourceCodeEnd":500,"githubUrl":"https://github.com/exo-explore/exo/blob/21a54c5ea0230a3bec1e1a786d200126c7e34ec6/src/exo/download/download_utils.py#L464-L500","documentation":"Error \"Failed to fetch file list for {model_id=} {revision=} {path=} {recursive=}\" thrown in exo-explore/exo.","triggerScenarios":"Thrown at src/exo/download/download_utils.py:482 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"21a54c5ea0230a3bec1e1a786d200126c7e34ec6","analyzedAt":"2026-08-26T00:02:16.033Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}