openai/codex · error · anyhow::Error
pet frame grid must cover spritesheet exactly: expected {spr
Error message
pet frame grid must cover spritesheet exactly: expected {spritesheet_width}x{spritesheet_height}, got {total_width}x{total_height} What it means
Error "pet frame grid must cover spritesheet exactly: expected {spritesheet_width}x{spritesheet_height}, got {total_width}x{total_height}" thrown in openai/codex.
Source
Thrown at codex-rs/tui/src/pets/model.rs:345
fn validate_frame_spec(
frame: &FrameSpec,
spritesheet_width: u32,
spritesheet_height: u32,
) -> Result<usize> {
if frame.width == 0 || frame.height == 0 || frame.columns == 0 || frame.rows == 0 {
bail!("pet frame dimensions and grid counts must be non-zero");
}
let total_width = frame
.width
.checked_mul(frame.columns)
.context("pet frame grid width overflow")?;
let total_height = frame
.height
.checked_mul(frame.rows)
.context("pet frame grid height overflow")?;
if total_width != spritesheet_width || total_height != spritesheet_height {
bail!(
"pet frame grid must cover spritesheet exactly: expected {spritesheet_width}x{spritesheet_height}, got {total_width}x{total_height}"
);
}
let frame_count = frame
.columns
.checked_mul(frame.rows)
.context("pet frame count overflow")?;
let frame_count = usize::try_from(frame_count).context("pet frame count does not fit usize")?;
if frame_count > MAX_PET_FRAMES {
bail!("pet frame count {frame_count} exceeds maximum {MAX_PET_FRAMES}");
}
Ok(frame_count)
}
fn custom_pet_cache_id(id: &str) -> String {
format!("custom-{id}")
}View on GitHub (pinned to 339751715c)
When it happens
Trigger: Thrown at codex-rs/tui/src/pets/model.rs:345 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/00fff77c06cf821e.
Report an issue: GitHub.