tinyhumansai/openhuman · error

runtime python server protocol mismatch: expected {}, got {:

Error message

runtime python server protocol mismatch: expected {}, got {:?}

What it means

The ready line's protocol field differs from the expected protocol version — the spawned python server code is from a different build than the Rust client (stale venv script, partial upgrade), so request/response framing cannot be trusted.

Source

Thrown at src/openhuman/runtime/python_server/server.rs:528

    }
    let mut lines = BufReader::new(stdout).lines();

    let ready_line = match tokio::time::timeout(HANDSHAKE_TIMEOUT, lines.next_line()).await {
        Ok(Ok(Some(line))) => line,
        Ok(Ok(None)) => bail!("runtime python server exited before readiness handshake"),
        Ok(Err(error)) => return Err(error).context("reading runtime python server handshake"),
        Err(_) => bail!("runtime python server readiness handshake timed out"),
    };
    let ready: ReadyLine = serde_json::from_str(&ready_line)
        .with_context(|| format!("parsing runtime python server ready line: {ready_line}"))?;
    if !ready.ready {
        bail!(
            "runtime python server failed to start: {}",
            ready.error.unwrap_or_else(|| "unknown".to_string())
        );
    }
    if ready.protocol != Some(PROTOCOL_VERSION) {
        bail!(
            "runtime python server protocol mismatch: expected {}, got {:?}",
            PROTOCOL_VERSION,
            ready.protocol
        );
    }
    log::info!(
        "[runtime_python_server] server ready backends={:?}",
        ready.backends
    );

    Ok(ServerInner {
        _child: child,
        stdin,
        stdout: lines,
        next_id: 0,
        ready_backends: ready.backends,
    })
}

View on GitHub (pinned to 7491200858)

Solutions

  1. Re-provision the python server venv so its scripts match this core build
  2. Delete stale server scripts and restart
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/runtime/python_server/server.rs:528 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/defe2cf5dbe8409a. Report an issue: GitHub.