{"record":{"id":"385fbd323e2dbd3d","repo":"exo-explore/exo","slug":"failed-to-download-file-model-id-revision-p","errorCode":null,"errorMessage":"Failed to download file {model_id=} {revision=} {path=} {target_dir=}","messagePattern":"Failed to download file (.+?) (.+?) (.+?) (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/exo/download/download_utils.py","lineNumber":660,"sourceCode":"            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 downloading {model_id}/{path}; \"\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            if attempt == n_attempts - 1:\n                on_connection_lost()\n                raise e\n            logger.error(\n                f\"Download error on attempt {attempt + 1}/{n_attempts} for {model_id=} {revision=} {path=} {target_dir=}\"\n            )\n            logger.error(traceback.format_exc())\n            await asyncio.sleep(2.0**attempt + random.uniform(0, 1))\n    raise Exception(\n        f\"Failed to download file {model_id=} {revision=} {path=} {target_dir=}\"\n    )\n\n\nasync def _download_file(\n    model_id: ModelId,\n    revision: str,\n    path: str,\n    target_dir: Path,\n    on_progress: Callable[[int, int, bool], None] = lambda _, __, ___: None,\n    skip_internet: bool = False,\n) -> Path:\n    target_path = target_dir / path\n\n    if await aios.path.exists(target_path):\n        if skip_internet:\n            return target_path\n","sourceCodeStart":642,"sourceCodeEnd":678,"githubUrl":"https://github.com/exo-explore/exo/blob/21a54c5ea0230a3bec1e1a786d200126c7e34ec6/src/exo/download/download_utils.py#L642-L678","documentation":"Error \"Failed to download file {model_id=} {revision=} {path=} {target_dir=}\" thrown in exo-explore/exo.","triggerScenarios":"Thrown at src/exo/download/download_utils.py:660 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"}