3b1b / manim

Animation engine for explanatory math videos
MIT License
70.79k stars 6.23k forks source link

manim isn't working even with their official examples #2067

Closed amcoolkid closed 1 year ago

amcoolkid commented 1 year ago

Describe the error

I am looking at the example https://3b1b.github.io/manim/getting_started/example_scenes.html#textexample

Shorttening it, I have the bare minimum

class TextExample(Scene):
    def construct(self):
        # To run this scene properly, you should have "Consolas" font in your computer
        # for full usage, you can see https://github.com/3b1b/manim/pull/680
        text = Text("Here is a text", font="Arial", font_size=90)
        difference = Text(
            """
            The most important difference between Text and TexText is that\n
            you can change the font more easily, but can't use the LaTeX grammar
            """,
            font="Arial", font_size=24,
            # t2c is a dict that you can choose color for different text
            t2c={
                "Text": BLUE, "TexText": BLUE, "LaTeX": ORANGE
            }
        )
        VGroup(text, difference).arrange(DOWN, buff=1)
        self.play(Write(text))
        self.play(FadeIn(difference, UP))
        self.wait(3)

This

        t2c={
            "Text": BLUE, "TexText": BLUE, "LaTeX": ORANGE
        }

would cause an error

text_mobject.py:678, in Text._merge_settings(self, left_setting, right_setting, default_args)
    676     default = default_args[arg]
    677     if left != default and getattr(right_setting, arg) != default:
--> 678         raise ValueError(
    679             f"Ambiguous style for text '{self.text[right_setting.start:right_setting.end]}':"
    680             + f"'{arg}' cannot be both '{left}' and '{right}'."
    681         )
    682     setattr(right_setting, arg, left if left != default else right)
    683 return new_setting

ValueError: Ambiguous style for text 'Text':'color' cannot be both '#58C4DD' and '#58C4DD'.

Even after I commenting that line out, I got another error

mobject.py:430, in Mobject.add(self, *mobjects)
    428 for m in mobjects:
    429     if not isinstance(m, Mobject):
--> 430         raise TypeError("All submobjects must be of type Mobject")
    431     if m is self:
    432         raise ValueError("Mobject cannot contain self")

TypeError: All submobjects must be of type Mobject

Environment

OS System: MacOS manim version: Manim Community v0.17.3 python version: 3.10.8 (main, Oct 12 2022, 03:26:28) [Clang 13.0.0 (clang-1300.0.29.30)]

TonyCrane commented 1 year ago

please don't use community's version to run 3b1b's code