Error with videos/_2018/fourier.py
- Ngôn ngữ chính
- Python
- Star
- 11.2k
- Fork
- 2.1k
- Merge trung bình
- 5 giờ 49 phút
- Pull request đã merge (30 ngày)
- 3
Mô tả
I recently came across Manim, and thanks to Grant Sanderson, who open-sourced this great animation engine for explanatory math videos. Right now, I'm trying to reproduce videos/_2018/fourier.py with the following error message, how can I fix it?
(manimGL) xw@xw-Alienware-17-R5:~/xw-projects/manim-videos$ manimgl _2018/fourier.py
ManimGL v1.7.2
01: AddingPureFrequencies
02: ApplyFourierToFourier
03: AskAboutAlmostFouierName
04: AskAboutInverseFourier
05: BeforeGettingToTheFullMath
06: BoundsAtInfinity
07: BreakApartSum
08: BuildUpExpressionStepByStep
09: CloseWithAPuzzle
10: DrawFrequencyPlot
11: EulersFormulaViaGroupTheoryWrapper
12: FilterOutHighPitch
13: FourierEndScreen
14: FourierMachineScene
15: Introduction
16: MachineThatTreatsOneFrequencyDifferently
17: MixingUnmixingTODOStub
18: MoreToCover
19: NextVideoWrapper
20: OneSmallNote
21: OtherContexts
22: PauseAndPonder
23: PuzzleDescription
24: ScaleUpCenterOfMass
25: ShowCommutativeDiagram
26: ShowLinearity
27: ShowLowerFrequency
28: ShowUncertaintyPrinciple
29: SimpleCosineWrappingAroundCircle
30: SponsorScreenGrab
31: StudentsHorrifiedAtScene
32: SubscribeOrBinge
33: SummarizeFormula
34: SummarizeTheFullTransform
35: TODOInsertCosineWrappingAroundCircle
36: TODOInsertUnmixingSound
37: TODOStub
38: TakeAStepBack
39: Thumbnail
40: UnmixMixedPaint
41: WhyAreYouTellingUsThis
42: WrapCosineGraphAroundCircle
43: WriteComplexExponentialExpression
44: XCoordinateLabelTypoFix
Select which scene to render (by name or number): 15
Traceback (most recent call last):
File "/home/xw/anaconda3/envs/manimGL/bin/manimgl", line 8, in
sys.exit(main())
File "/home/xw/anaconda3/envs/manimGL/lib/python3.10/site-packages/manimlib/__main__.py", line 61, in main
run_scenes()
File "/home/xw/anaconda3/envs/manimGL/lib/python3.10/site-packages/manimlib/__main__.py", line 39, in run_scenes
scene.run()
File "/home/xw/anaconda3/envs/manimGL/lib/python3.10/site-packages/manimlib/scene/scene.py", line 153, in run
self.setup()
File "/home/xw/xw-projects/manim-videos/./custom/characters/pi_creature_scene.py", line 264, in setup
super().setup()
File "/home/xw/xw-projects/manim-videos/./custom/characters/pi_creature_scene.py", line 49, in setup
self.pi_creatures = VGroup(*self.create_pi_creatures())
File "/home/xw/xw-projects/manim-videos/./custom/characters/pi_creature_scene.py", line 284, in create_pi_creatures
self.teacher = Mortimer(color=self.teacher_color)
File "/home/xw/xw-projects/manim-videos/./custom/characters/pi_creature.py", line 311, in __init__
super().__init__(mode, color, flip_at_start=flip_at_start, **kwargs)
File "/home/xw/xw-projects/manim-videos/./custom/characters/pi_creature.py", line 74, in __init__
self.init_structure()
File "/home/xw/xw-projects/manim-videos/./custom/characters/pi_creature.py", line 101, in init_structure
original_irises=VGroup(parts[2], parts[6]),
IndexError: list index out of range
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
Lỗi xảy ra trong custom/characters/pi_creature.py tại dòng 101, nơi nó cố gắng truy cập chỉ mục 2 và 6 của một danh sách 'parts' quá ngắn. Trước tiên, kiểm tra file pi_creature.py để hiểu cách 'parts' được tạo và cấu trúc mong đợi là gì. Sau đó, kiểm tra phần khởi tạo class Mortimer trong cùng file để xem các tham số mode hoặc color có ảnh hưởng đến danh sách parts hay không. Chạy cảnh cụ thể (Introduction) ở chế độ debug hoặc thêm các câu lệnh print để xem độ dài của 'parts' sẽ giúp xác định lý do tại sao chỉ mục vượt ra khỏi phạm vi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Lĩnh vực
- computer-graphics
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 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
- 45/100