I need to generate animations with more than 1000 frames. Increased the padding size to 7 just to be safe.
increased the padding on FileMovieWritter.frame_format_str
Obviously this only fixes the problem temporarily. One could update the attribute of the object if it were needed to go even higher. I will merge none-the-less, since 4 was arbitrary in the first place.