3b1b / 3b1b/manim

Getting ValueError when trying to run a simple example python file(Ubuntu)

Đang mở
#2,114 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
93.8k
Fork
7.7k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

#### I tried running manimgl with and without root priviliges and i got these errors repeatedly
## sudo -E manimgl example_scenes.py
ManimGL v1.6.1
[20:01:11] INFO Using the default configuration file, which you can modify in `/home/dot/.local/lib/python3.10/site-packages/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
01: AnimatingMethods
02: ControlsExample
03: CoordinateSystemExample
04: GraphExample
05: InteractiveDevelopment
06: OpeningManimExample
07: SurfaceExample
08: TexAndNumbersExample
09: TexIndexing
10: TexTransformExample
11: TextExample
12: UpdatersExample

That module has multiple scenes, which ones would you like to render?
Scene Name or Number: 4
Traceback (most recent call last):
File "/usr/local/bin/manimgl", line 33, in
sys.exit(load_entry_point('manimgl', 'console_scripts', 'manimgl')())
File "/home/dot/.local/lib/python3.10/site-packages/manimlib/__main__.py", line 25, in main
scene.run()
File "/home/dot/.local/lib/python3.10/site-packages/manimlib/scene/scene.py", line 91, in run
self.construct()
File "/home/dot/manim/example_scenes.py", line 422, in construct
axes = Axes((-3, 10), (-1, 8), height=6)
File "/home/dot/.local/lib/python3.10/site-packages/manimlib/mobject/coordinate_systems.py", line 383, in __init__
self.x_axis = self.create_axis(
File "/home/dot/.local/lib/python3.10/site-packages/manimlib/mobject/coordinate_systems.py", line 405, in create_axis
axis = NumberLine(range_terms, **new_config)
File "/home/dot/.local/lib/python3.10/site-packages/manimlib/mobject/number_line.py", line 60, in __init__
super().__init__(self.x_min * RIGHT, self.x_max * RIGHT, **kwargs)
File "/home/dot/.local/lib/python3.10/site-packages/manimlib/mobject/geometry.py", line 450, in __init__
super().__init__(**kwargs)
File "/home/dot/.local/lib/python3.10/site-packages/manimlib/mobject/types/vectorized_mobject.py", line 85, in __init__
super().__init__(**kwargs)
File "/home/dot/.local/lib/python3.10/site-packages/manimlib/mobject/mobject.py", line 89, in __init__
self.init_points()
File "/home/dot/.local/lib/python3.10/site-packages/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/dot/.local/lib/python3.10/site-packages/manimlib/mobject/geometry.py", line 487, in set_points_by_ends
self.set_points_as_corners([start, end])
File "/home/dot/.local/lib/python3.10/site-packages/manimlib/mobject/types/vectorized_mobject.py", line 496, in set_points_as_corners
self.set_anchors_and_handles(*[
File "/home/dot/.local/lib/python3.10/site-packages/manimlib/mobject/types/vectorized_mobject.py", line 365, in set_anchors_and_handles
self.set_points(new_points)
File "/home/dot/.local/lib/python3.10/site-packages/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)

### I have disabled my conda env too and installed latex, but still the issue persists

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

The error occurs in manimlib/mobject/types/vectorized_mobject.py when setting points for a NumberLine in Axes. Start by examining the traceback: the ValueError about broadcasting shapes suggests a mismatch in array dimensions. Look at the init_points method in geometry.py and how set_points_by_ends is called. Check the values of start, end, buff, and path_arc passed to set_points_by_ends. Run the example_scenes.py with scene GraphExample to reproduce the issue, then debug the shape of self.get_points() versus old_points in the wrapper.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
backend
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.