{"record":{"id":"defe2cf5dbe8409a","repo":"tinyhumansai/openhuman","slug":"runtime-python-server-protocol-mismatch-expected","errorCode":null,"errorMessage":"runtime python server protocol mismatch: expected {}, got {:?}","messagePattern":"runtime python server protocol mismatch: expected (.+?), got (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/runtime/python_server/server.rs","lineNumber":528,"sourceCode":"    }\n    let mut lines = BufReader::new(stdout).lines();\n\n    let ready_line = match tokio::time::timeout(HANDSHAKE_TIMEOUT, lines.next_line()).await {\n        Ok(Ok(Some(line))) => line,\n        Ok(Ok(None)) => bail!(\"runtime python server exited before readiness handshake\"),\n        Ok(Err(error)) => return Err(error).context(\"reading runtime python server handshake\"),\n        Err(_) => bail!(\"runtime python server readiness handshake timed out\"),\n    };\n    let ready: ReadyLine = serde_json::from_str(&ready_line)\n        .with_context(|| format!(\"parsing runtime python server ready line: {ready_line}\"))?;\n    if !ready.ready {\n        bail!(\n            \"runtime python server failed to start: {}\",\n            ready.error.unwrap_or_else(|| \"unknown\".to_string())\n        );\n    }\n    if ready.protocol != Some(PROTOCOL_VERSION) {\n        bail!(\n            \"runtime python server protocol mismatch: expected {}, got {:?}\",\n            PROTOCOL_VERSION,\n            ready.protocol\n        );\n    }\n    log::info!(\n        \"[runtime_python_server] server ready backends={:?}\",\n        ready.backends\n    );\n\n    Ok(ServerInner {\n        _child: child,\n        stdin,\n        stdout: lines,\n        next_id: 0,\n        ready_backends: ready.backends,\n    })\n}","sourceCodeStart":510,"sourceCodeEnd":546,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/runtime/python_server/server.rs#L510-L546","documentation":"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.","triggerScenarios":"Thrown at src/openhuman/runtime/python_server/server.rs:528 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-provision the python server venv so its scripts match this core build","Delete stale server scripts and restart"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}