{"record":{"id":"3be27dc0e946ecf5","repo":"tinyhumansai/openhuman","slug":"either-content-or-file-is-required-run-openh","errorCode":null,"errorMessage":"either --content or --file is required. Run `openhuman tree-summarizer ingest --help`.","messagePattern":"either --content or --file is required\\. Run `openhuman tree-summarizer ingest --help`\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/memory/tree/tree_runtime/cli.rs","lineNumber":143,"sourceCode":"\n    let namespace = &rest[0];\n\n    let content = if let Some(ref path) = opts.file {\n        if path == \"-\" {\n            use std::io::Read;\n            let mut buf = String::new();\n            std::io::stdin()\n                .read_to_string(&mut buf)\n                .map_err(|e| anyhow::anyhow!(\"failed to read stdin: {e}\"))?;\n            buf\n        } else {\n            std::fs::read_to_string(path)\n                .map_err(|e| anyhow::anyhow!(\"failed to read '{}': {e}\", path))?\n        }\n    } else if let Some(ref text) = opts.content {\n        text.clone()\n    } else {\n        return Err(anyhow::anyhow!(\n            \"either --content or --file is required. Run `openhuman tree-summarizer ingest --help`.\"\n        ));\n    };\n\n    if content.trim().is_empty() {\n        return Err(anyhow::anyhow!(\"content is empty\"));\n    }\n\n    init_logging(opts.verbose);\n\n    let rt = build_runtime()?;\n    rt.block_on(async {\n        let config = load_config().await?;\n        let outcome = crate::openhuman::memory::tree::tree_runtime::rpc::tree_summarizer_ingest(\n            &config, namespace, &content, None, None,\n        )\n        .await\n        .map_err(anyhow::Error::msg)?;","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/memory/tree/tree_runtime/cli.rs#L125-L161","documentation":"A usage guard in the tree-summarizer ingest subcommand: neither `--content` nor `--file` was supplied, so there is no text to ingest. The subcommand requires exactly one of these to provide the raw content, and the error message points the user at `--help` for the correct invocation.","triggerScenarios":"Thrown at src/openhuman/memory/tree/tree_runtime/cli.rs:143 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass inline text: `openhuman tree-summarizer ingest my-ns --content \"some text\"`","Or read from a file: `openhuman tree-summarizer ingest my-ns --file ./notes.txt`","Or from stdin: `cat notes.txt | openhuman tree-summarizer ingest my-ns --file -`","Run `openhuman tree-summarizer ingest --help` to see all options"],"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-14T05:17:10.506Z"}