3b1b / videos

Code for the manim-generated scenes used in 3blue1brown videos
5.79k stars 1.55k forks source link

Can't init submobjects of Pi Creature #43

Open yinsuhu opened 2 years ago

yinsuhu commented 2 years ago

when i run the command: manimgl _2022\wordle\footnote.py WeCanDoBetter i got the following results, i find out that the submobjects array is empty but i am sure i config the pi_creature_images directory correctly.

PS F:\manim_videos\videos> manimgl _2022\wordle\footnote.py WeCanDoBetter
ManimGL v1.5.0
Traceback (most recent call last):
  File "f:\python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "f:\python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "F:\Python38\Scripts\manimgl.exe\__main__.py", line 7, in <module>
  File "f:\python38\lib\site-packages\manimlib\__main__.py", line 25, in main
    scene.run()
  File "f:\python38\lib\site-packages\manimlib\scene\scene.py", line 80, in run
    self.construct()
  File "F:\manim_videos\videos\_2022\wordle\footnote.py", line 791, in construct
    morty = Mortimer()
  File "F:\manim_videos\videos\custom\characters\pi_creature.py", line 70, in __init__
    SVGMobject.__init__(self, file_name=svg_file, **kwargs)
  File "f:\python38\lib\site-packages\manimlib\mobject\svg\svg_mobject.py", line 60, in __init__
    super().__init__(**kwargs)
  File "f:\python38\lib\site-packages\manimlib\mobject\types\vectorized_mobject.py", line 77, in __init__
    super().__init__(**kwargs)
  File "f:\python38\lib\site-packages\manimlib\mobject\mobject.py", line 80, in __init__
    self.init_colors()
  File "F:\manim_videos\videos\custom\characters\pi_creature.py", line 110, in init_colors
    self.name_parts()
  File "F:\manim_videos\videos\custom\characters\pi_creature.py", line 94, in name_parts
    self.mouth = self.submobjects[MOUTH_INDEX]
IndexError: list index out of range
PS F:\manim_videos\videos>
yinsuhu commented 2 years ago

btw, the Pi Creature svg file used in the program is PiCreatures_plain.svg file and is renamed as plain.svg.

CaftBotti commented 10 months ago

See here.