{"record":{"id":"2d181a532aad4f35","repo":"tinyhumansai/openhuman","slug":"runtime-python-server-exited-before-readiness-hand","errorCode":null,"errorMessage":"runtime python server exited before readiness handshake","messagePattern":"runtime python server exited before readiness handshake","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/runtime/python_server/server.rs","lineNumber":515,"sourceCode":"            .context(\"spawning runtime python server\")?;\n    let stdin = child\n        .stdin\n        .take()\n        .context(\"runtime python server stdin missing\")?;\n    let stdout = child\n        .stdout\n        .take()\n        .context(\"runtime python server stdout missing\")?;\n    if let Some(stderr) = child.stderr.take() {\n        drain_server_stderr(stderr);\n    } else {\n        log::debug!(\"[runtime_python_server] stderr pipe missing; continuing without drain\");\n    }\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    }","sourceCodeStart":497,"sourceCodeEnd":533,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/runtime/python_server/server.rs#L497-L533","documentation":"spawn_inner read EOF on the server's stdout before the ready line — the freshly spawned python server process died immediately (import error, missing interpreter). Distinct from a timeout: the pipe closed.","triggerScenarios":"Thrown at src/openhuman/runtime/python_server/server.rs:515 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the drained stderr log for the crash reason","Re-provision the server venv","Verify the python interpreter resolves and runs the server entrypoint"],"exampleFix":null,"handlingStrategy":"retry","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"}