3b1b/manim

Undefined method only in List Comprehension in the Interactive CLI

fikriauliya opened this issue · 2 comments

Describe the error

The following codes do the same exact thing

        # Ok
        self.play(ShowCreation(rectangles[0]), ShowCreation(rectangles[2]))

        # Ok
        self.play(*[ShowCreation(rectangles[0]), ShowCreation(rectangles[2])])

        # Error: name 'ShowCreation' is not defined
        self.play(*[ShowCreation(rectangles[i]) for i in range(2)])

However, in the list comprehension one, the ShowCreation method becomes undefined

And somehow, it only occurs on the Interactive Mode. (manimgl)
Running the whole .py is ok (manimgl main.py DrawCircle)

Environment

OS System: MacOS Sonoma 14.3
manim version: 1.4.1
python version: 3.10.0

requires-python = "~=3.10.0"
dependencies = [
    "manimgl>=1.4.1",
    "setuptools>=75.1.0",
    "numpy~=1.24",
]
3b1b commented

There was a recent PR to address namespace issues in that interactive mode. Can you confirm whether the issue still comes up with the most recent commit?