XX-net/XX-Net · warning
download %s fail
Error message
download %s fail
What it means
While iterating module download URLs, download_file(url, file_path) returned False and the launcher logs 'download %s fail' and continues to the next candidate URL. This is a per-URL network failure, not fatal; other mirrors may still succeed.
Source
Thrown at code/default/launcher/update.py:186
import os
global update_content, update_dict
current_path = os.path.dirname(os.path.abspath(__file__))
download_path = os.path.abspath(os.path.join(current_path, os.pardir, os.pardir, 'data', 'downloads'))
if not os.path.isdir(download_path):
os.mkdir(download_path)
try:
for source in update_dict["modules"][module]["versions"][new_version]["sources"]:
url = source["url"]
filename = module + "-" + new_version + ".zip"
file_path = os.path.join(download_path, filename)
if os.path.isfile(file_path) and sha1_file(file_path) == update_dict["modules"][module]["versions"][new_version]["sha1"]:
pass
elif not download_file(url, file_path):
xlog.warn("download %s fail", url)
continue
sha1 = sha1_file(file_path)
if update_dict["modules"][module]["versions"][new_version]["sha1"] != sha1:
xlog.warn("download %s sha1 wrong", url)
continue
module_path = os.path.abspath(os.path.join(current_path, os.pardir, os.pardir, module))
if not os.path.isdir(module_path):
os.mkdir(module_path)
version_path = os.path.join(module_path, new_version)
if os.path.isdir(version_path):
xlog.error("module dir exist:%s, download exist.", version_path)
return
with zipfile.ZipFile(file_path, "r") as dz:
dz.extractall(module_path)View on GitHub (pinned to cfa5bc17b6)
Solutions
- Check network/proxy connectivity: can you curl the logged URL?
- Retry the update later — the downloader tries multiple mirrors and transient failures are common
- Verify the launcher's own proxy settings are correct (a broken local proxy breaks update downloads)
- If all URLs fail, inspect update_from_github.download_file logs for the underlying exception
Defensive patterns
Strategy: retry
Validate before calling
def url_reachable(url, timeout=10):
import urllib.request
try:
urllib.request.urlopen(urllib.request.Request(url, method='HEAD'), timeout=timeout)
return True
except Exception:
return False Try / catch
for url in urls:
try:
download_file(url, path)
break
except Exception as e:
log.warning('download failed %s: %r', url, e)
continue Prevention
- Provide multiple mirror URLs (the downloader already continues to the next)
- Check the local proxy before triggering updates
- Retry updates on flaky networks instead of investigating immediately
When it happens
Trigger: download_module calling download_file for a module URL when the request raises/times out or returns a non-200 status inside update_from_github.download_file, causing it to return False.
Common situations: One mirror unreachable (GFW blocking, server down, DNS failure, proxy misconfigured); the loop usually recovers via the next URL in the list.
Related errors
- download size:%d, need size:%d, download fail.
- time out
- time out
- get README fail:
- download xxnet zip fail:
AI-assisted analysis of XX-net/XX-Net@cfa5bc17b6 (2026-08-27).
Data as JSON: /api/errors/ba46d1f95cf89f6e.
Report an issue: GitHub.