-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terminal shows error after quitting interactive mode #4019
Comments
After investigating for a while, I think I've found the problem. It seems that manim is rendering twice, the first time in tempconfig and the second time after quitting the interactive mode. testgl.pyfrom manim import *
from manim.opengl import *
played = False
class TestOpenGL(Scene):
def construct(self):
global played
# return if the animation is already played once
if played:
return
surface = OpenGLSurface(
lambda u,v: (u, v, np.sqrt(u**2+v**2)),
u_range=(-2,2),
v_range=(-2,2),
color=BLUE
)
surface_1 = OpenGLSurface(
lambda u,v: (u, v, u**2 + v**2),
u_range=(-2,2),
v_range=(-2,2),
color=PINK
)
self.camera.set_euler_angles(theta=0*DEGREES,phi=40*DEGREES,gamma=0*DEGREES)
self.play(Create(surface))
self.play(Transform(surface,surface_1),run_time=3)
self.play(surface.animate.shift(np.array((0.0, 0.0, -3.0))))
self.interactive_embed()
played = True
with tempconfig({"renderer": "opengl","enable_gui":True}):
scene = TestOpenGL()
scene.render() launch.json{
"version": "0.2.0",
"configurations": [
{
"name": "Python Debugger: Manim File",
"type": "debugpy",
"request": "launch",
"module": "manim",
"args": ["${file}", "--dry_run","--force_window"],
"console": "integratedTerminal",
"justMyCode": false
}
]
} For manim cli I removed the tempconfig part and used the flags instead |
Description of bug / unexpected behavior
When I try using Manim's interactive mode in VSC, the animations are shown. However, as soon as I quit the gui (by pressing Q), the terminal shows errors before closing. The error messages are in the form of
AttributeError: X has no attribute Y
. This behaviour appears whether I debug with VSC or run the file using manim cli. It also appears no matter what animation I'm using.Here's an example:
Expected behavior
It should quit with no error message
How to reproduce the issue
Python code to replicate the shown error
launch.json configuration
System specifications
System Details
The text was updated successfully, but these errors were encountered: