HKUDS/nanobot · error · TuiUnavailableError

downloaded TUI archive failed checksum verification

Error message

downloaded TUI archive failed checksum verification

What it means

Error "downloaded TUI archive failed checksum verification" thrown in HKUDS/nanobot.

Source

Thrown at nanobot/cli/tui_launcher.py:265

        return None

    target_dir = get_data_dir() / "bin" / "tui" / version
    cached = _cached_release_tui(target_dir, asset)
    if cached is not None:
        return cached

    base = f"https://github.com/HKUDS/nanobot/releases/download/v{version}"
    archive_name = f"{asset}.zip"
    try:
        checksum = _read_release_asset(f"{base}/{archive_name}.sha256", max_bytes=1024)
        expected = _release_checksum(checksum, archive_name)
        if expected is None:
            return None
        archive = _read_release_asset(f"{base}/{archive_name}", max_bytes=200 * 1024 * 1024)
    except (OSError, TimeoutError, urllib.error.URLError, urllib.error.HTTPError):
        return None
    if hashlib.sha256(archive).hexdigest() != expected:
        raise TuiUnavailableError("downloaded TUI archive failed checksum verification")
    files = _verified_release_archive(archive, asset)

    temporary: dict[str, Path] = {}
    try:
        target_dir.mkdir(parents=True, exist_ok=True)
        for name, content in files.items():
            path = target_dir / name
            pending = path.with_name(f"{path.name}.tmp-{os.getpid()}")
            pending.write_bytes(content)
            if name == asset and os.name != "nt":
                pending.chmod(0o755)
            temporary[name] = pending
        for name in _release_bundle_names(asset):
            temporary[name].replace(target_dir / name)
    except OSError:
        for path in temporary.values():
            path.unlink(missing_ok=True)
        _clear_cached_release(target_dir, asset)

View on GitHub (pinned to 42f37dc4c0)

When it happens

Trigger: Thrown at nanobot/cli/tui_launcher.py:265 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of HKUDS/nanobot@42f37dc4c0 (2026-08-26). Data as JSON: /api/errors/9155ec0f5f598828. Report an issue: GitHub.