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

keyword argument 'line_join' #3371

Closed
yyi016100 opened this issue Sep 20, 2023 · 2 comments · Fixed by #3510
Closed

keyword argument 'line_join' #3371

yyi016100 opened this issue Sep 20, 2023 · 2 comments · Fixed by #3510

Comments

@yyi016100
Copy link

yyi016100 commented Sep 20, 2023

Description of bug / unexpected behavior

When I rendering the line joint scene from basic.py from the example scene it shows Mobject.init() got an unexpected keyword argument 'line_join'

How to reproduce the issue

Code for reproducing the problem
class LineJoints(Scene):
    def construct(self):
        t1 = Triangle()
        t2 = Triangle(line_join=LineJointType.ROUND)
        t3 = Triangle(line_join=LineJointType.BEVEL)

        grp = VGroup(t1, t2, t3).arrange(RIGHT)
        grp.set(width=config.frame_width - 1)

        self.add(grp)

Logs

Virtual Code Studio output
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ C:\tools\Manim\Lib\site-packages\manim\cli\render\commands.py:115 in render                      │
│                                                                                                  │
│   112 │   │   │   try:                                                                           │
│   113 │   │   │   │   with tempconfig({}):                                                       │
│   114 │   │   │   │   │   scene = SceneClass()                                                   │
│ ❱ 115 │   │   │   │   │   scene.render()                                                         │
│   116 │   │   │   except Exception:                                                              │
│   117 │   │   │   │   error_console.print_exception()                                            │
│   118 │   │   │   │   sys.exit(1)                                                                │
│                                                                                                  │
│ C:\tools\Manim\Lib\site-packages\manim\scene\scene.py:223 in render                              │
│                                                                                                  │
│    220 │   │   """                                                                               │
│    221 │   │   self.setup()                                                                      │
│    222 │   │   try:                                                                              │
│ ❱  223 │   │   │   self.construct()                                                              │
│    224 │   │   except EndSceneEarlyException:                                                    │
│    225 │   │   │   pass                                                                          │
│    226 │   │   except RerunSceneException as e:                                                  │
│                                                                                                  │
│ C:\Users\HP\Documents\ManimCE\basic.py:170 in construct                                          │
│                                                                                                  │
│   167 class LineJoints(Scene):                                                                   │
│   168 │   def construct(self):                                                                   │
│   169 │   │   t1 = Triangle()                                                                    │
│ ❱ 170 │   │   t2 = Triangle(line_join=LineJointType.ROUND)                                       │
│   171 │   │   t3 = Triangle(line_join=LineJointType.BEVEL)                                       │
│   172 │   │                                                                                      │
│   173 │   │   grp = VGroup(t1, t2, t3).arrange(RIGHT)                                            │
│                                                                                                  │
│ C:\tools\Manim\Lib\site-packages\manim\mobject\geometry\polygram.py:559 in __init__              │
│                                                                                                  │
│   556 │   """                                                                                    │
│   557 │                                                                                          │
│   558 │   def __init__(self, **kwargs):                                                          │
│ ❱ 559 │   │   super().__init__(n=3, **kwargs)                                                    │
│   560                                                                                            │
│   561                                                                                            │
│   562 class Rectangle(Polygon):                                                                  │
│                                                                                                  │
│ C:\tools\Manim\Lib\site-packages\manim\mobject\geometry\polygram.py:428 in __init__              │
│                                                                                                  │
│   425 │   """                                                                                    │
│   426 │                                                                                          │
│   427 │   def __init__(self, n: int = 6, **kwargs):                                              │
│ ❱ 428 │   │   super().__init__(n, density=1, **kwargs)                                           │
│   429                                                                                            │
│   430                                                                                            │
│   431 class Star(Polygon):                                                                       │
│                                                                                                  │
│ C:\tools\Manim\Lib\site-packages\manim\mobject\geometry\polygram.py:399 in __init__              │
│                                                                                                  │
│   396 │   │   │                                                                                  │
│   397 │   │   │   vertex_groups.append(group)                                                    │
│   398 │   │                                                                                      │
│ ❱ 399 │   │   super().__init__(*vertex_groups, **kwargs)                                         │
│   400                                                                                            │
│   401                                                                                            │
│   402 class RegularPolygon(RegularPolygram):                                                     │
│                                                                                                  │
│ C:\tools\Manim\Lib\site-packages\manim\mobject\geometry\polygram.py:69 in __init__               │
│                                                                                                  │
│    66 │   """                                                                                    │
│    67 │                                                                                          │
│    68 │   def __init__(self, *vertex_groups: Iterable[Sequence[float]], color=BLUE, **kwargs):   │
│ ❱  69 │   │   super().__init__(color=color, **kwargs)                                            │
│    70 │   │                                                                                      │
│    71 │   │   for vertices in vertex_groups:                                                     │
│    72 │   │   │   first_vertex, *vertices = vertices                                             │
│                                                                                                  │
│ C:\tools\Manim\Lib\site-packages\manim\mobject\types\vectorized_mobject.py:125 in __init__       │
│                                                                                                  │
│    122 │   │   self.shade_in_3d = shade_in_3d                                                    │
│    123 │   │   self.tolerance_for_point_equality = tolerance_for_point_equality                  │
│    124 │   │   self.n_points_per_cubic_curve = n_points_per_cubic_curve                          │
│ ❱  125 │   │   super().__init__(**kwargs)                                                        │
│    126 │   │                                                                                     │
│    127 │   │   if fill_color:                                                                    │
│    128 │   │   │   self.fill_color = fill_color                                                  │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
TypeError: Mobject.__init__() got an unexpected keyword argument 'line_join'
CMD output Traceback (most recent call last): File "C:\Users\HP\Documents\ManimCE\mce\Lib\site-packages\numpy\core\__init__.py", line 24, in from . import multiarray File "C:\Users\HP\Documents\ManimCE\mce\Lib\site-packages\numpy\core\multiarray.py", line 10, in from . import overrides File "C:\Users\HP\Documents\ManimCE\mce\Lib\site-packages\numpy\core\overrides.py", line 8, in from numpy.core._multiarray_umath import ( ModuleNotFoundError: No module named 'numpy.core._multiarray_umath'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\HP\Documents\ManimCE\mce\Lib\site-packages\numpy_init_.py", line 158, in
from numpy.config import show as show_config
File "C:\Users\HP\Documents\ManimCE\mce\Lib\site-packages\numpy_config_.py", line 4, in
from numpy.core.multiarray_umath import (
File "C:\Users\HP\Documents\ManimCE\mce\Lib\site-packages\numpy\core_init
.py", line 50, in
raise ImportError(msg)
ImportError:

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  • The Python version is: Python3.11 from "C:\Users\HP\Documents\ManimCE\mce\Scripts\python.exe"
  • The NumPy version is: "1.26.0"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: No module named 'numpy.core._multiarray_umath'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "", line 198, in run_module_as_main
File "", line 88, in run_code
File "C:\Users\HP\Documents\ManimCE\mce\Scripts\manim.exe_main
.py", line 4, in
File "C:\Users\HP\Documents\ManimCE\mce\Lib\site-packages\manim_init
.py", line 17, in
from .config import *
File "C:\Users\HP\Documents\ManimCE\mce\Lib\site-packages\manim_config_init
.py", line 10, in
from .utils import ManimConfig, ManimFrame, make_config_parser
File "C:\Users\HP\Documents\ManimCE\mce\Lib\site-packages\manim_config\utils.py", line 27, in
import numpy as np
File "C:\Users\HP\Documents\ManimCE\mce\Lib\site-packages\numpy_init_.py", line 163, in
raise ImportError(msg) from e
ImportError: Error importing numpy: you should not try to import numpy from
its source directory; please exit the numpy source tree, and relaunch
your python interpreter from there.

System specifications

System Details
  • OS Windows 10
  • Python version (3.11.5)
@uwezi
Copy link
Contributor

uwezi commented Sep 20, 2023

That is a known bug in the code which as far as I know has been corrected already for the next release. It needs to be joint_type= ...

@uwezi
Copy link
Contributor

uwezi commented Dec 8, 2023

This is still not fixed in the documentation
https://github.com/ManimCommunity/manim/blob/main/example_scenes/basic.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging a pull request may close this issue.

2 participants