ruvnet/RuView · error · anyhow::Error
cannot read {}: {e}
Error message
cannot read {}: {e} What it means
room-status failed to std::fs::read_to_string the specialist-bank file (default ./room-bank.json). The command is read-only reporting; the io::Error is typically NotFound (train-room not run yet, wrong path, or wrong working directory), permission denied, or non-UTF-8 content when another artifact is passed by mistake.
Source
Thrown at v2/crates/wifi-densepose-cli/src/room.rs:304
Ok(())
}
// ---------------------------------------------------------------------------
// room-status
// ---------------------------------------------------------------------------
/// Arguments for `room-status`.
#[derive(Args, Debug, Clone)]
pub struct RoomStatusArgs {
/// Specialist-bank file.
#[arg(long, default_value = "./room-bank.json")]
pub bank: String,
}
/// Execute `room-status`.
pub async fn room_status(args: RoomStatusArgs) -> Result<()> {
let raw = std::fs::read_to_string(&args.bank)
.map_err(|e| anyhow::anyhow!("cannot read {}: {e}", args.bank))?;
let bank = SpecialistBank::from_json(&raw).map_err(|e| anyhow::anyhow!("{e}"))?;
println!("room: {}", bank.room_id);
println!("baseline: {}", bank.baseline_id);
println!("trained_at: {}", bank.trained_at_unix_s);
println!("anchors: {}", bank.anchor_count);
println!("specialists: {:?}", bank.trained_kinds());
Ok(())
}
// ---------------------------------------------------------------------------
// room-watch
// ---------------------------------------------------------------------------
/// Arguments for `room-watch`.
#[derive(Args, Debug, Clone)]
pub struct RoomWatchArgs {
/// Specialist-bank file (single-node mode).
#[arg(long, default_value = "./room-bank.json")]View on GitHub (pinned to 4685618388)
Solutions
- Run train-room first and pass the exact path it wrote via --bank
- Use an absolute path instead of relying on the ./room-bank.json default
- Confirm the file is the JSON bank, not another artifact
- Fix permissions if the file exists but is unreadable
Example fix
// before $ cd /srv && ruview room-status # cannot read ./room-bank.json // after $ ruview room-status --bank /srv/ruview/room-bank.json
Defensive patterns
Strategy: validation
Validate before calling
fn bank_file_readable(path: &str) -> bool {
std::path::Path::new(path).is_file() && std::fs::read_to_string(path).is_ok()
} Prevention
- Print and reuse the artifact path each pipeline stage emits
- Wrap the calibrate-to-room-status pipeline in one script with a shared artifacts directory
- Pass --bank explicitly rather than relying on the ./room-bank.json default
When it happens
Trigger: Querying status before train-room produced the bank; --bank defaulting to ./room-bank.json while running from another directory; passing the enrollment JSON or binary baseline instead of the bank.
Common situations: Relative-path assumptions across shell sessions; artifact mixups along the calibrate, enroll, train-room, room-status chain.
Related errors
- cannot read baseline {path}: {e} — run `calibrate` first
- cannot read {}: {e} — run `enroll` first
- cannot read geometry {path}: {e}
- cannot read {path}: {e}
- Refusing CLI access: repository marker escapes the trusted r
AI-assisted analysis of ruvnet/RuView@4685618388 (2026-08-16).
Data as JSON: /api/errors/a8985751a2b5223e.
Report an issue: GitHub.