{"record":{"id":"491242513279947f","repo":"NousResearch/hermes-agent","slug":"failed-to-download-url-exc-491242","errorCode":null,"errorMessage":"Failed to download {url}: {exc}","messagePattern":"Failed to download (.+?): (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"agent/secret_sources/bitwarden.py","lineNumber":287,"sourceCode":"            staged,\n            stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR\n            | stat.S_IRGRP | stat.S_IXGRP\n            | stat.S_IROTH | stat.S_IXOTH,\n        )\n        os.replace(staged, target)\n\n    logger.info(\"Installed bws %s at %s\", _BWS_VERSION, target)\n    return target\n\n\ndef _http_download(url: str, dest: Path) -> None:\n    req = urllib.request.Request(url, headers={\"User-Agent\": \"hermes-agent\"})\n    try:\n        with urllib.request.urlopen(req, timeout=_BWS_DOWNLOAD_TIMEOUT) as resp:  # noqa: S310\n            with open(dest, \"wb\") as f:\n                shutil.copyfileobj(resp, f)\n    except urllib.error.URLError as exc:\n        raise RuntimeError(f\"Failed to download {url}: {exc}\") from exc\n\n\ndef _expected_sha256(checksum_file: Path, asset_name: str) -> str:\n    \"\"\"Parse the upstream ``bws-sha256-checksums-X.Y.Z.txt`` file.\n\n    Format is the standard ``sha256sum`` output: ``<hex>  <filename>``,\n    one per line.\n    \"\"\"\n    text = checksum_file.read_text(encoding=\"utf-8\", errors=\"replace\")\n    for line in text.splitlines():\n        parts = line.strip().split()\n        if len(parts) >= 2 and parts[-1] == asset_name:\n            return parts[0]\n    raise RuntimeError(\n        f\"No checksum entry for {asset_name} in {checksum_file.name}\"\n    )\n\n","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/NousResearch/hermes-agent/blob/c896c09c42910c584c4c7d2325b58c14713ea42c/agent/secret_sources/bitwarden.py#L269-L305","documentation":"Error \"Failed to download {url}: {exc}\" thrown in NousResearch/hermes-agent.","triggerScenarios":"Thrown at agent/secret_sources/bitwarden.py:287 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check network access to the Bitwarden SDK release host and retry the download.","Retry later or download the bws binary manually from the releases page."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c896c09c42910c584c4c7d2325b58c14713ea42c","analyzedAt":"2026-08-14T17:18:01.089Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}