XX-net/XX-Net · error · IOError

get update file %s fail:

Error message

get update file %s fail:

What it means

IOError raised by get_github_versions when download_file returns falsy for the update manifest URL (https://raw.githubusercontent.com/XX-net/XX-Net/master/code/default/update_v5.txt). Unlike the timeout exception, download_file swallows its own errors and returns False, so this IOError is the surfaced failure for any download problem (network, HTTP error, DNS).

Source

Thrown at code/default/launcher/update_from_github.py:201

        with open(readme_file) as fd:
            content = fd.read()
            p = re.compile(r'([0-9]+)\.([0-9]+)\.([0-9]+)')
            m = p.match(content)
            if m:
                version = m.group(1) + "." + m.group(2) + "." + m.group(3)
                return version
    except:
        xlog.warn("get_version_fail in update_from_github")

    return "get_version_fail"


def get_github_versions():
    readme_url = "https://raw.githubusercontent.com/XX-net/XX-Net/master/code/default/update_v5.txt"
    readme_target = os.path.join(download_path, "version.txt")

    if not download_file(readme_url, readme_target):
        raise IOError("get update file %s fail:" % readme_url)

    versions = parse_update_versions(readme_target)
    return versions


def get_hash_sum(version):
    versions = get_github_versions()
    for v in versions:
        if v[1] == version:
            return v[2]


def hash_file_sum(filename):
    import hashlib

    BLOCKSIZE = 65536
    hasher = hashlib.sha256()
    try:

View on GitHub (pinned to cfa5bc17b6)

Solutions

  1. Test access: curl the manifest URL; if blocked, configure a proxy in launcher settings or fix DNS
  2. Retry later — GitHub raw access is frequently intermittent in restricted regions
  3. Update manually (download release zip from GitHub mirrors) if auto-update consistently fails
  4. Flush DNS / switch to a DNS resolver that answers correctly for raw.githubusercontent.com
Defensive patterns

Strategy: retry

Validate before calling

import urllib.request
try:
    urllib.request.urlopen('https://raw.githubusercontent.com/XX-net/XX-Net/master/code/default/update_v5.txt', timeout=10)
except Exception:
    raise RuntimeError('GitHub raw unreachable; configure proxy before updating')

Try / catch

try:
    versions = get_github_versions()
except IOError as e:
    if 'get update file' in str(e):
        time.sleep(120)  # GitHub raw often intermittently blocked
        versions = get_github_versions()
    else:
        raise

Prevention

When it happens

Trigger: check_update / get_hash_sum / req_update_handler invoking get_github_versions while raw.githubusercontent.com is unreachable, blocked, or returns non-200.

Common situations: raw.githubusercontent.com blocked by GFW/DNS poisoning, offline machine, corporate proxy blocking GitHub, transient GitHub outage.

Related errors


AI-assisted analysis of XX-net/XX-Net@cfa5bc17b6 (2026-08-27). Data as JSON: /api/errors/30f0a1504bb5c855. Report an issue: GitHub.