Original message (verbatim)
Animation '%s' doesn't exist.
Placeholders such as %s / %d are kept verbatim from the engine source and are not replaced with concrete values.
Trigger
Godot 4.x runtime/editor script: calling add_frame, set_frame, get_frame_count, remove_frame, clear, set_animation_speed or similar methods on SpriteFrames with an animation name that has not been created yet.
Typical cause
Each SpriteFrames method cannot find the matching animation iterator E in the animations hash; ERR_FAIL_COND_MSG(!E, ...) returns directly.
Step-by-step fix
- Call add_animation(anim) to create the animation first.
- Verify the passed string matches the animation name exactly.
- Note that when the same SpriteFrames resource is reused by multiple instances, the animation lists are independent.
Source links
- https://raw.githubusercontent.com/godotengine/godot/master/scene/resources/sprite_frames.cpp#38
- https://docs.godotengine.org/en/stable/classes/class_spriteframes.html
- https://forum.godotengine.org/t/error-animation-doesnt-exist/129541
- https://forum.godotengine.org/t/animation-doesnt-exist/1289
Per-entry sources and capture date are listed at /sources#G03.
Related errors
Related Godot errors
Need an offline quick-reference checklist?
Atlas error library Pro pack: 123 error references (110 single + 13 merged) plus a quick-fix guide, $19 one-time purchase, delivered as electronic files.
Back to the all-errors index Checkout and buy the Pro pack — $19.00