Starter example missing log file
- 主要語言
- Python
- 星號
- 93.9k
- 分支
- 7.7k
- 平均合併
- 2 天 13 小時
- 30 天內合併 PR
- 4
描述
### Describe the bug
Just a minor bug, seems that the starter example references a log file which isn't included in the repo. Probably an easy fix.
**Code**:
I tried both `manim-render example_scenes.py OpeningManimExample`
and `manimgl example_scenes.py OpeningManimExample`, the first two commands the README says to test out
**Wrong display or Error traceback**:
Here's the full error:
```
[17:23:40] ERROR LaTeX Error! Not a worry, it happens to the best of us. tex_file_writing.py:114
Traceback (most recent call last):
File "/Users/elliottower/anaconda3/envs/umshini/bin/manim-render", line 8, in
sys.exit(main())
File "/Users/elliottower/Documents/GitHub/manim/manimlib/__main__.py", line 25, in main
scene.run()
File "/Users/elliottower/Documents/GitHub/manim/manimlib/scene/scene.py", line 160, in run
self.construct()
File "example_scenes.py", line 29, in construct
IntegerMatrix(matrix, include_background_rectangle=True),
File "/Users/elliottower/Documents/GitHub/manim/manimlib/mobject/matrix.py", line 204, in __init__
super().__init__(matrix, element_alignment_corner=element_alignment_corner, **kwargs)
File "/Users/elliottower/Documents/GitHub/manim/manimlib/mobject/matrix.py", line 99, in __init__
self.add_brackets(bracket_v_buff, bracket_h_buff)
File "/Users/elliottower/Documents/GitHub/manim/manimlib/mobject/matrix.py", line 144, in add_brackets
brackets = Tex("".join((
File "/Users/elliottower/Documents/GitHub/manim/manimlib/mobject/svg/tex_mobject.py", line 57, in __init__
super().__init__(
File "/Users/elliottower/Documents/GitHub/manim/manimlib/mobject/svg/string_mobject.py", line 68, in __init__
super().__init__(
File "/Users/elliottower/Documents/GitHub/manim/manimlib/mobject/svg/svg_mobject.py", line 76, in __init__
self.init_svg_mobject()
File "/Users/elliottower/Documents/GitHub/manim/manimlib/mobject/svg/svg_mobject.py", line 105, in init_svg_mobject
submobs = self.mobjects_from_file(self.get_file_path())
File "/Users/elliottower/Documents/GitHub/manim/manimlib/mobject/svg/string_mobject.py", line 78, in get_file_path
return self.get_file_path_by_content(self.get_content(is_labelled))
File "/Users/elliottower/Documents/GitHub/manim/manimlib/mobject/svg/tex_mobject.py", line 85, in get_file_path_by_content
return tex_content_to_svg_file(
File "/Users/elliottower/Documents/GitHub/manim/manimlib/utils/tex_file_writing.py", line 83, in tex_content_to_svg_file
create_tex_svg(full_tex, svg_file, compiler)
File "/Users/elliottower/Documents/GitHub/manim/manimlib/utils/tex_file_writing.py", line 118, in create_tex_svg
with open(root + ".log", "r", encoding="utf-8") as log_file:
FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/5y/hjb1rykx58xcbwg6r04m76tr0000gn/T/Tex/c3372cf5b2620435.log'
```
### Additional context
貢獻指南
這個儲存庫沒有索引到貢獻指南
研究方向
此錯誤發生在 manimlib/utils/tex_file_writing.py 的第118行,當中它嘗試開啟一個不存在的 .log 檔案。查看 create_tex_svg 函式以了解 LaTeX 編譯流程。檢查日誌檔是否應該建立,或在缺少時錯誤處理是否應跳過讀取。執行失敗命令在本機重現並測試修正。
由索引模型根據 Issue 內容生成。
評估
- 領域
- cli, tooling
- Issue 類型
- 缺陷
- 難度
- 2/5
- 預估耗時
- 1-3 小時
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 45/100