openai/codex · error · anyhow::Error

animation {name} must include at least one frame

Error message

animation {name} must include at least one frame

What it means

Error "animation {name} must include at least one frame" thrown in openai/codex.

Source

Thrown at codex-rs/tui/src/pets/model.rs:400

        return Ok(PathBuf::from(home).join(&value[2..]));
    }

    Ok(PathBuf::from(value))
}

fn load_animations(
    specs: HashMap<String, AnimationSpec>,
    frame_count: usize,
) -> Result<HashMap<String, Animation>> {
    let mut animations = default_animations();
    if specs.is_empty() {
        validate_animation_indices(&animations, frame_count)?;
        return Ok(animations);
    }

    for (name, spec) in specs {
        if spec.frames.is_empty() {
            bail!("animation {name} must include at least one frame");
        }
        for sprite_index in &spec.frames {
            if *sprite_index >= frame_count {
                bail!(
                    "animation {name} references sprite index {sprite_index}, but pet has {frame_count} frames"
                );
            }
        }

        let fps = match spec.fps {
            Some(fps) if fps.is_finite() && fps > 0.0 && fps <= MAX_ANIMATION_FPS => fps,
            Some(fps) => {
                bail!(
                    "animation {name} fps must be finite and between 0 and {MAX_ANIMATION_FPS}, got {fps}"
                );
            }
            None => 8.0,
        };

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/tui/src/pets/model.rs:400 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/05ea7bfa676c1f2c. Report an issue: GitHub.