Skip to content
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

[BUG] manimgl rendering: unexpected keyword argument 'skip_animations' #314

Closed
ttiee opened this issue Nov 18, 2023 · 13 comments · Fixed by #499
Closed

[BUG] manimgl rendering: unexpected keyword argument 'skip_animations' #314

ttiee opened this issue Nov 18, 2023 · 13 comments · Fixed by #499
Labels
bug Something isn't working cli Related to the command line interface manimgl Exclusive to ManimGL python Pull requests that update Python code waiting external Waiting for things that are external to Manim Slides (e.g., a feature on a dependency)

Comments

@ttiee
Copy link

ttiee commented Nov 18, 2023

Description

Hello, I am new to use manimgl and manim-slides

this when running manimgl demo01.py BasicExample, it runs well

from manimlib import *
import numpy as np
from manim_slides import Slide

class BasicExample(Scene):
    def construct(self):
        circle = Circle(radius=3, color=BLUE)
        dot = Dot()

        self.play(GrowFromCenter(circle))

        self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear)

        self.play(dot.animate.move_to(ORIGIN))

but replace the Scene to Slide like this

from manimlib import *
import numpy as np
from manim_slides import Slide

class BasicExample(Slide):
    def construct(self):
        circle = Circle(radius=3, color=BLUE)
        dot = Dot()

        self.play(GrowFromCenter(circle))

        self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear)

        self.play(dot.animate.move_to(ORIGIN))

I get the following error:

(.env) E:\Manim\manimgl>manimgl demo01.py BasicExample
ManimGL v1.6.1
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "E:\Manim\manimgl\.env\Scripts\manimgl.exe\__main__.py", line 7, in <module>
  File "E:\Manim\manimgl\manimlib\__main__.py", line 22, in main
    scenes = manimlib.extract_scene.main(config)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Manim\manimgl\manimlib\extract_scene.py", line 134, in main
    scenes = get_scenes_to_render(all_scene_classes, scene_config, config)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Manim\manimgl\manimlib\extract_scene.py", line 107, in get_scenes_to_render
    return [
           ^
  File "E:\Manim\manimgl\manimlib\extract_scene.py", line 108, in <listcomp>
    scene_from_class(scene_class, scene_config, config)
  File "E:\Manim\manimgl\manimlib\extract_scene.py", line 86, in scene_from_class
    return scene_class(**scene_config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\Manim\manimgl\.env\Lib\site-packages\manim_slides\slide\manimlib.py", line 19, in __init__
    super().__init__(*args, **kwargs)
  File "E:\Manim\manimgl\.env\Lib\site-packages\manim_slides\slide\base.py", line 29, in __init__
    super().__init__(*args, **kwargs)
  File "E:\Manim\manimgl\manimlib\scene\scene.py", line 122, in __init__
    self.file_writer = SceneFileWriter(self, **self.file_writer_config)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: SceneFileWriter.__init__() got an unexpected keyword argument 'skip_animations'

I don't really know why
I will apprechiate a lot If you can give me some help

Version

The latest manimgl and manim-slides

Platform

Win11

Screenshots

image

Additional information

No response

@ttiee ttiee added the bug Something isn't working label Nov 18, 2023
@jeertmans jeertmans added cli Related to the command line interface python Pull requests that update Python code manimgl Exclusive to ManimGL labels Nov 18, 2023
@jeertmans
Copy link
Owner

jeertmans commented Nov 18, 2023

Hello @ttiee, are you sure that you are using Manim Slides v5?

Because running your code works perfectly on my computer (with the same version of ManimGL).

Can you run this code and check the version printed?

import numpy as np
from manimlib import *

import manim_slides
from manim_slides import Slide

print("Manim Slides version:", manim_slides.__version__)


class BasicExample(Slide):
    def construct(self):
        circle = Circle(radius=3, color=BLUE)
        dot = Dot()

        self.play(GrowFromCenter(circle))

        self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear)

        self.play(dot.animate.move_to(ORIGIN))

@ttiee
Copy link
Author

ttiee commented Nov 18, 2023

Hello, @jeertmans I appreciate your reply.
image

Yes, it is indeed that version. However, I had previously executed manimgl --config, and I'm unsure if that might have had any impact.
And I installed the manimgl by git clone https://github.com/3b1b/manim.git
Here is my custom_config.yml

break_into_partial_movies: false
camera_resolutions:
  4k: 3840x2160
  default_resolution: high
  high: 1920x1080
  low: 854x480
  medium: 1280x720
directories:
  mirror_module_path: false
  output: default
  raster_images: default
  sounds: default
  temporary_storage: E:\Manim\manimgl\Temp
  vector_images: default
fps: 30
full_screen: false
style:
  background_color: '#333333'
  font: Consolas
  tex_template: default
universal_import_line: from manimlib import *
window_monitor: 0
window_position: UR

@jeertmans
Copy link
Owner

Can you rapidly test without your configuration file? (delete it or move it elsewhere temporarily).

@jeertmans
Copy link
Owner

jeertmans commented Nov 18, 2023

Ok so actually the error may be that you installed manimgl from the master branch, rather than from the v1.6.1 tag. Even though the printed version is the same, the code change a lot in between the two.

The issue is the ManimGL is only updated once in a while, and breaking changes occur almost every release.

I cannot find what caused the breakage in 3b1b/manim@v1.6.1...master, but can you git checkout tags/v1.6.1. re-install manimgl and see if it works?

@ttiee
Copy link
Author

ttiee commented Nov 19, 2023

Ok so actually the error may be that you installed manimgl from the master branch, rather than from the v1.6.1 tag. Even though the printed version is the same, the code change a lot in between the two.

The issue is the ManimGL is only updated once in a while, and breaking changes occur almost every release.

I cannot find what caused the breakage in 3b1b/manim@v1.6.1...master, but can you git checkout tags/v1.6.1. re-install manimgl and see if it works?

Yes, the error may be from master branch

image

I re-install the manimgl and manim-slides, It can render the animation file.

It seems that manimgl-tag1.6.1 can't run on python3.10 and 3.11.So I create a virtual environment python=3.8.10.And I install by pip install manim-slides[manimgl], not git clone.

But when running manim-slides BasicExample
image
It is frozen here, and:

(.env-3.8.10) E:\Manim\manimgl-manim-slides>manim-slides BasicExample
    failed to get textures for frame; format: 172 textureConverter null
Device loss detected in Present()
Device loss detected in Present()

@jeertmans
Copy link
Owner

Ok so I think this is a separate bugs from the first one.

could you create another issue with the title: Device loss detected in Present() and re-post the images / details from your last comment?

For the first issue, this is because your were using some unreleased version of ManimGL that contains breaking changes. I will address these changes when they are released.

For the second issue, I think this is related to PySide6, the graphical library I use. This may be related, but does not help: https://bugreports.qt.io/browse/QTBUG-92097.

Can you try rerunning the Manim slides command, but setting export QT_DEBUG_PLUGINS=1 before, and put the output here?

@ttiee
Copy link
Author

ttiee commented Nov 19, 2023

All right. Here is the new issue and the output after setting the QT_DEBUG_PLUGINS=1

@jeertmans jeertmans added the waiting external Waiting for things that are external to Manim Slides (e.g., a feature on a dependency) label Nov 19, 2023
@jeertmans jeertmans changed the title [BUG] Can't render the animation file [BUG] manimgl rendering: unexpected keyword argument 'skip_animations' Nov 19, 2023
@jeertmans
Copy link
Owner

I labelled this as waiting external as we need to see what ManimGL's next version will be.

Maybe I should restrict the manimgl version to be <=1.6.1, but we'll see.

jeertmans added a commit that referenced this issue Nov 21, 2023
jeertmans added a commit that referenced this issue Nov 21, 2023
* chore(docs): warn users about #314

Closes #316

* chore(lint): apply suggested changes
@jeertmans
Copy link
Owner

jeertmans commented Jan 29, 2024

Closing this as issue is now documented by #316, and we cannot really do anything about that...

@MerlinDumeur
Copy link

Hi, I am getting the same issue, but I made sure to install manimgl from pypi: here is the checkhealth:

Manim Slides version: 5.1.10
Python executable: ~/miniforge3/envs/manim/bin/python3.12
Manim bindings:
        manim (version: 0.18.1)
        manimgl (version: 1.7.1)
Qt API: pyside6 (version: 6.8.1)

I guess this could be related to the new version 1.7.1?

@jeertmans
Copy link
Owner

Hi @MerlinDumeur

I guess this could be related to the new version 1.7.1?

Yes, this could be very likely this. I haven't tested it yet.

@jeertmans
Copy link
Owner

See #499.

@jeertmans jeertmans linked a pull request Dec 10, 2024 that will close this issue
@MerlinDumeur
Copy link

It works for me now after installing from the main branch, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli Related to the command line interface manimgl Exclusive to ManimGL python Pull requests that update Python code waiting external Waiting for things that are external to Manim Slides (e.g., a feature on a dependency)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants