{"record":{"id":"aea6aa49aac01530","repo":"XX-net/XX-Net","slug":"download-xxnet-zip-fail","errorCode":null,"errorMessage":"download xxnet zip fail:","messagePattern":"download xxnet zip fail:","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"code/default/launcher/setup.py","lineNumber":79,"sourceCode":"                if m:\n                    version = m.group(1) + \".\" + m.group(2) + \".\" + m.group(3)\n                    return m.group(0), version\n        except Exception as e:\n            xlog.exception(\"get version fail:%s\", e)\n        raise \"get_version_fail:\" % readme_file\n\n    readme_url = \"https://raw.githubusercontent.com/XX-net/XX-Net/master/README.md\"\n    readme_targe = os.path.join(download_path, \"README.md\")\n    if not os.path.isdir(download_path):\n        os.mkdir(download_path)\n    if not download_file(readme_url, readme_targe):\n        raise \"get README fail:\" + readme_url\n    xxnet_url, xxnet_version = get_xxnet_url_version(readme_targe)\n    xxnet_unzip_path = os.path.join(download_path, \"XX-Net-%s\" % xxnet_version)\n    xxnet_zip_file = os.path.join(download_path, \"XX-Net-%s.zip\" % xxnet_version)\n\n    if not download_file(xxnet_url, xxnet_zip_file):\n        raise \"download xxnet zip fail:\" + download_path\n\n    with zipfile.ZipFile(xxnet_zip_file, \"r\") as dz:\n        dz.extractall(download_path)\n        dz.close()\n\n\ndef install_xxnet_files():\n    def sha1_file(filename):\n        import hashlib\n\n        BLOCKSIZE = 65536\n        hasher = hashlib.sha1()\n        try:\n            with open(filename, 'rb') as afile:\n                buf = afile.read(BLOCKSIZE)\n                while len(buf) > 0:\n                    hasher.update(buf)\n                    buf = afile.read(BLOCKSIZE)","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/XX-net/XX-Net/blob/cfa5bc17b67676e467f37ec50766127e0ab5f0aa/code/default/launcher/setup.py#L61-L97","documentation":"After successfully fetching README and resolving the version, downloading the XX-Net zip release file failed; the code does `raise \"download xxnet zip fail:\" + download_path` (a string raise — TypeError on Python 3). The download URL points to the GitHub release archive for the resolved version.","triggerScenarios":"download_file returns False for the XX-Net-<version>.zip URL — network blocked to github release assets, release asset missing for the parsed version, or disk/path issues in download_path.","commonSituations":"GitHub release downloads blocked or throttled, version parsed incorrectly (regex matched a stale link so the zip URL 404s), insufficient disk space or unwritable download_path.","solutions":["Verify the parsed xxnet_version and that https://github.com/XX-net/XX-Net/releases/download/.../<version> zip actually exists","Manually download the zip into download_path and re-run setup","Fix network/proxy access to github.com release assets","Use a real exception and log the failing URL for diagnosability"],"exampleFix":"# before\nif not download_file(xxnet_url, xxnet_zip_file):\n    raise \"download xxnet zip fail:\" + download_path\n\n# after\nif not download_file(xxnet_url, xxnet_zip_file):\n    raise RuntimeError(\"download xxnet zip fail:\" + xxnet_url)","handlingStrategy":"retry","validationCode":"import urllib.request\nurllib.request.urlopen(HEAD-request-to-release-url) status == 200  # verify zip URL exists","typeGuard":null,"tryCatchPattern":"for attempt in range(3):\n    if download_file(xxnet_url, xxnet_zip_file):\n        break\n    time.sleep(2 ** attempt)\nelse:\n    raise RuntimeError('download xxnet zip fail:' + xxnet_url)","preventionTips":["Validate the resolved version/URL before downloading","Ensure disk space and write perms on download_path","Pre-place the zip manually in restricted environments"],"tags":["download","release-archive","launcher","network"],"backgroundTag":"download-failed","analyzedSha":"cfa5bc17b67676e467f37ec50766127e0ab5f0aa","analyzedAt":"2026-08-27T19:28:28.225Z","schemaVersion":2},"datasetVersion":"2026-08-28T00:17:15.603Z"}