Code Monkey home page Code Monkey logo

Comments (9)

semikernel avatar semikernel commented on June 11, 2024

I have seen #315 #314, but it doesn't help me.

from manim-slides.

jeertmans avatar jeertmans commented on June 11, 2024

Hello, so I see you refer to #314: can you confirm you did not install manimgl from the GitHub repository?

from manim-slides.

semikernel avatar semikernel commented on June 11, 2024

Hello, so I see you refer to #314: can you confirm you did not install manimgl from the GitHub repository?

I use these lines to install manimgl:

git clone https://github.com/3b1b/manim.git
cd manim
conda create -n manim python=3.8
conda activate manim
pip install -e .

from manim-slides.

jeertmans avatar jeertmans commented on June 11, 2024

Ok, so you indeed installed ManimGL from the repository, which is not supported as explained in #314. The main reason is that the master branch (the default one) contains unreleased breaking changes.

Please change the installation setup with:

git clone https://github.com/3b1b/manim.git
git checkout v1.6.1
cd manim
conda create -n manim python=3.8
conda activate manim
pip install -e .

from manim-slides.

jeertmans avatar jeertmans commented on June 11, 2024

Any update on this @semikernel?

from manim-slides.

semikernel avatar semikernel commented on June 11, 2024

Any update on this @semikernel?

Hi,there! I changed the installation repository to

git clone https://github.com/3b1b/manim.git

However, it doesn't work for me.
The terminal prompt still has the same error.

The detailed is here.I created a new conda environment called mslides_gl_e

manim-slides render report411gl.py --GL
ManimGL v1.6.1
[16:41:34] INFO     Using the default configuration file, which    config.py:362
                    you can modify in                                           
                    `/home/semikernel/Tiktok/Slides_gl_E/manim/man              
                    imlib/default_config.yml`                                   
           INFO     If you want to create a local configuration    config.py:363
                    file, you can create a file named                           
                    `custom_config.yml`, or run `manimgl --config`              
1: P16
2: P8i

That module has multiple scenes, which ones would you like to render?
Scene Name or Number: 2
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/semikernel/Tiktok/Slides_gl_E/manim/manimlib/__main__.py", line 29, in <module>
    main()
  File "/home/semikernel/Tiktok/Slides_gl_E/manim/manimlib/__main__.py", line 22, in main
    scenes = manimlib.extract_scene.main(config)
  File "/home/semikernel/Tiktok/Slides_gl_E/manim/manimlib/extract_scene.py", line 134, in main
    scenes = get_scenes_to_render(all_scene_classes, scene_config, config)
  File "/home/semikernel/Tiktok/Slides_gl_E/manim/manimlib/extract_scene.py", line 107, in get_scenes_to_render
    return [
  File "/home/semikernel/Tiktok/Slides_gl_E/manim/manimlib/extract_scene.py", line 108, in <listcomp>
    scene_from_class(scene_class, scene_config, config)
  File "/home/semikernel/Tiktok/Slides_gl_E/manim/manimlib/extract_scene.py", line 86, in scene_from_class
    return scene_class(**scene_config)
  File "/home/semikernel/.local/lib/python3.10/site-packages/manim_slides/slide/manimlib.py", line 19, in __init__
    super().__init__(*args, **kwargs)
  File "/home/semikernel/.local/lib/python3.10/site-packages/manim_slides/slide/base.py", line 38, in __init__
    super().__init__(*args, **kwargs)
  File "/home/semikernel/Tiktok/Slides_gl_E/manim/manimlib/scene/scene.py", line 125, in __init__
    self.file_writer = SceneFileWriter(self, **self.file_writer_config)
TypeError: SceneFileWriter.__init__() got an unexpected keyword argument 'skip_animations'

The P8i is a manim scene I created.

from manim-slides.

jeertmans avatar jeertmans commented on June 11, 2024

Hello @semikernel, did you run git checkout v1.6.1 before installing with pip?

from manim-slides.

semikernel avatar semikernel commented on June 11, 2024

Hello @semikernel, did you run git checkout v1.6.1 before installing with pip?

Thank you for your hint, now it don't show 'skip animation' warning. I used to ignore that step just because I don't know that I should use git checkout in the manim directory. However, now it has another weird waring:

ValueError: operands could not be broadcast together with shapes (3,3) (0,3)

My Code is TestGL.py, it's a copy of the manim-slides documentation.

from manimlib import *
from manim_slides import Slide, ThreeDSlide

class ThreeDExample(ThreeDSlide):
    def construct(self):
        axes = ThreeDAxes()
        circle = Circle(radius=3, color=BLUE)
        dot = Dot(color=RED)

        self.add(axes)

        frame = self.camera.frame
        frame.set_euler_angles(
            theta=30 * DEGREES,
            phi=75 * DEGREES,
        )

        self.play(GrowFromCenter(circle))

        def updater(m, dt):
            return m.increment_theta((75 * DEGREES / 4) * dt)

        frame.add_updater(updater)

        self.next_slide()

        self.next_slide(loop=True)
        self.play(MoveAlongPath(dot, circle), run_time=4, rate_func=linear)
        self.next_slide()

        frame.remove_updater(updater)
        self.play(frame.animate.set_theta(30 * DEGREES))
        self.play(dot.animate.move_to(ORIGIN))
        self.next_slide()

        self.play(dot.animate.move_to(RIGHT * 3))
        self.next_slide()

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

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

The terminal then outputs:

ManimGL v1.6.1
[11:08:45] INFO     Using the default configuration file, which you can modify in `/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/default_config.yml`                                             config.py:265
           INFO     If you want to create a local configuration file, you can create a file named `custom_config.yml`, or run `manimgl --config`                                                      config.py:266
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/__main__.py", line 29, in <module>
    main()
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/__main__.py", line 25, in main
    scene.run()
  File "/home/semikernel/.local/lib/python3.10/site-packages/manim_slides/slide/manimlib.py", line 64, in run
    super().run(*args, **kwargs)
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/scene/scene.py", line 91, in run
    self.construct()
  File "/home/semikernel/Tiktok/Slides_gl_e/TestGL.py", line 6, in construct
    axes = ThreeDAxes()
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/coordinate_systems.py", line 464, in __init__
    Axes.__init__(self, x_range, y_range, **kwargs)
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/coordinate_systems.py", line 383, in __init__
    self.x_axis = self.create_axis(
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/coordinate_systems.py", line 405, in create_axis
    axis = NumberLine(range_terms, **new_config)
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/number_line.py", line 60, in __init__
    super().__init__(self.x_min * RIGHT, self.x_max * RIGHT, **kwargs)
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/geometry.py", line 450, in __init__
    super().__init__(**kwargs)
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/types/vectorized_mobject.py", line 85, in __init__
    super().__init__(**kwargs)
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/mobject.py", line 89, in __init__
    self.init_points()
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/geometry.py", line 453, in init_points
    self.set_points_by_ends(self.start, self.end, self.buff, self.path_arc)
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/geometry.py", line 487, in set_points_by_ends
    self.set_points_as_corners([start, end])
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/types/vectorized_mobject.py", line 496, in set_points_as_corners
    self.set_anchors_and_handles(*[
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/types/vectorized_mobject.py", line 365, in set_anchors_and_handles
    self.set_points(new_points)
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/types/vectorized_mobject.py", line 968, in wrapper
    if not np.all(self.get_points() == old_points):
ValueError: operands could not be broadcast together with shapes (3,3) (0,3) 

Could you please give me some hints about what should I do know? Thx a lot!
Screenshot from 2024-05-18 11-20-01

from manim-slides.

jeertmans avatar jeertmans commented on June 11, 2024

Hello @semikernel, did you run git checkout v1.6.1 before installing with pip?

Thank you for your hint, now it don't show 'skip animation' warning. I used to ignore that step just because I don't know that I should use git checkout in the manim directory. However, now it has another weird waring:

ValueError: operands could not be broadcast together with shapes (3,3) (0,3)

My Code is TestGL.py, it's a copy of the manim-slides documentation.

from manimlib import *
from manim_slides import Slide, ThreeDSlide

class ThreeDExample(ThreeDSlide):
    def construct(self):
        axes = ThreeDAxes()
        circle = Circle(radius=3, color=BLUE)
        dot = Dot(color=RED)

        self.add(axes)

        frame = self.camera.frame
        frame.set_euler_angles(
            theta=30 * DEGREES,
            phi=75 * DEGREES,
        )

        self.play(GrowFromCenter(circle))

        def updater(m, dt):
            return m.increment_theta((75 * DEGREES / 4) * dt)

        frame.add_updater(updater)

        self.next_slide()

        self.next_slide(loop=True)
        self.play(MoveAlongPath(dot, circle), run_time=4, rate_func=linear)
        self.next_slide()

        frame.remove_updater(updater)
        self.play(frame.animate.set_theta(30 * DEGREES))
        self.play(dot.animate.move_to(ORIGIN))
        self.next_slide()

        self.play(dot.animate.move_to(RIGHT * 3))
        self.next_slide()

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

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

The terminal then outputs:

ManimGL v1.6.1
[11:08:45] INFO     Using the default configuration file, which you can modify in `/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/default_config.yml`                                             config.py:265
           INFO     If you want to create a local configuration file, you can create a file named `custom_config.yml`, or run `manimgl --config`                                                      config.py:266
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/__main__.py", line 29, in <module>
    main()
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/__main__.py", line 25, in main
    scene.run()
  File "/home/semikernel/.local/lib/python3.10/site-packages/manim_slides/slide/manimlib.py", line 64, in run
    super().run(*args, **kwargs)
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/scene/scene.py", line 91, in run
    self.construct()
  File "/home/semikernel/Tiktok/Slides_gl_e/TestGL.py", line 6, in construct
    axes = ThreeDAxes()
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/coordinate_systems.py", line 464, in __init__
    Axes.__init__(self, x_range, y_range, **kwargs)
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/coordinate_systems.py", line 383, in __init__
    self.x_axis = self.create_axis(
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/coordinate_systems.py", line 405, in create_axis
    axis = NumberLine(range_terms, **new_config)
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/number_line.py", line 60, in __init__
    super().__init__(self.x_min * RIGHT, self.x_max * RIGHT, **kwargs)
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/geometry.py", line 450, in __init__
    super().__init__(**kwargs)
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/types/vectorized_mobject.py", line 85, in __init__
    super().__init__(**kwargs)
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/mobject.py", line 89, in __init__
    self.init_points()
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/geometry.py", line 453, in init_points
    self.set_points_by_ends(self.start, self.end, self.buff, self.path_arc)
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/geometry.py", line 487, in set_points_by_ends
    self.set_points_as_corners([start, end])
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/types/vectorized_mobject.py", line 496, in set_points_as_corners
    self.set_anchors_and_handles(*[
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/types/vectorized_mobject.py", line 365, in set_anchors_and_handles
    self.set_points(new_points)
  File "/home/semikernel/Tiktok/Slides_gl_e/manim/manimlib/mobject/types/vectorized_mobject.py", line 968, in wrapper
    if not np.all(self.get_points() == old_points):
ValueError: operands could not be broadcast together with shapes (3,3) (0,3) 

Could you please give me some hints about what should I do know? Thx a lot! Screenshot from 2024-05-18 11-20-01

Nice, I will close this issue then as this is solved.

For you second issue, this is because you need to downgrade NumPy, see 3b1b/manim#2053 (comment).

from manim-slides.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.