manim icon indicating copy to clipboard operation
manim copied to clipboard

Running an animation group with certain values doesn't work

Open turtlelover891 opened this issue 2 months ago • 1 comments

Description of bug / unexpected behavior

I am a beginner writing some manim and I come across a bug. There is a very specific case I found that seemingly makes manim not want to run anymore. If i change the last line's run_time = 2 into run_time 2.0 then it runs perfectly fine. it also works with any other value for run_time, as well as any other value for lag_ratio.

Expected behavior

The expected behavior is for the code to run as it is as the animation it is now

Code for reproducing the problem
from manim import *

class first(Scene):
    def construct(self):
        rects = []
        for i in range(14):
            rects.append(Rectangle(width = .95, height = 1, fill_opacity = 1).shift(LEFT*(6.5-i)))
        g1 = VGroup(*rects)
        rects2 = []
        for i in range(10):
            rects2.append(Rectangle(width = .95, height = 1, fill_opacity = 1).shift(LEFT*(6.5-i)+UP))
        g2 = VGroup(*rects2)

        g2.set_color_by_gradient(PURPLE, BLUE, PURE_GREEN, YELLOW, ORANGE, PURE_RED)
        s1 = SurroundingRectangle(g1, color=WHITE)
        s2 = SurroundingRectangle(g2)
        s3 = SurroundingRectangle(s2, color = WHITE)


        self.play(Create(g1, run_time = 1), Create(s1, run_time = 1))
        self.play(ReplacementTransform(VGroup(g1, s1), VGroup(g2, s2)))
        self.play(Create(s3))

        t1 = Text("Hello World")
        for i in range(len(g2)):
            t1[i].next_to(g2[i], UP*1.5)
        self.play(*[ReplacementTransform(g2[i], t1[i]) for i in range(len(g2))])
        self.play(AnimationGroup(*[Indicate(i, color = RED) for i in t1], run_time = 2, lag_ratio=.1))

Additional media files

It didn't render anything

Logs

Terminal output
InvalidDataError: [Errno 1094995529] Invalid data found when processing input: 
'C:\\Users\\vlase\\manimations\\media\\videos\\Manim1\\1080p60\\partial_movie_f
iles\\first\\partial_movie_file_list.txt'
[46520] Execution returned code=1 in 1.639 seconds returned signal null 

System specifications

System Details
  • OS: Windows 11 Home 24H2
  • RAM: 16 GB
  • Python version (python/py/python3 --version): Python 3.13.2
  • Installed modules (provide output from pip list):
Package           Version
----------------- -----------
audioop-lts       0.2.2
av                13.1.0
beautifulsoup4    4.14.2
click             8.3.0
cloup             3.0.8
colorama          0.4.6
decorator         5.2.1
glcontext         3.0.0
isosurfaces       0.1.2
manim             0.19.0
ManimPango        0.6.0
mapbox_earcut     1.0.3
markdown-it-py    4.0.0
mdurl             0.1.2
moderngl          5.12.0
moderngl-window   3.1.1
MouseInfo         0.1.3
networkx          3.5
numpy             2.2.4
pillow            11.3.0
pip               25.2
PyAutoGUI         0.9.54
pycairo           1.28.0
pydub             0.25.1
pygame            2.6.1
PyGetWindow       0.0.9
pyglet            2.1.9
pyglm             2.8.2
Pygments          2.19.2
PyMsgBox          1.0.9
PyOpenGL          3.1.9
pyperclip         1.9.0
PyRect            0.2.0
PyScreeze         1.0.1
pytweening        1.2.0
rich              14.2.0
scipy             1.16.2
screeninfo        0.8.1
skia-pathops      0.8.0.post2
soupsieve         2.8
srt               3.5.3
svgelements       1.9.6
tqdm              4.67.1
typing_extensions 4.15.0
watchdog          6.0.0

Additional comments

turtlelover891 avatar Oct 12 '25 22:10 turtlelover891

I don't understand what you are trying to describe is the problem. The code you provided works fine for run_time=2 and run_time=2.0. My python version is 3.13.5 and the manim version is v0.19.0 (same as yours). If the problem is still not fixed, please try to describe it in more detail.👍

This is the output i got after running your code with both run_time=2 and run_time=2.0 https://github.com/user-attachments/assets/6d47ed0b-c4ab-4f67-b1f2-b0f817e59ece

paarthsiloiya avatar Dec 09 '25 11:12 paarthsiloiya