question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tex File doesn't exist in example_scenes.py example

See original GitHub issue

Describe the error

The display of example scene went wrong while running. Tex File doesn’t exist.

Code and Error

Code:

  1. Clone the repo
  2. cd into and pip install -e .
  3. manimgl example_scenes.py OpeningManimExample as described in the README

Error: The first line is from print(f"opening {os.path.dirname(tex_file)}") in utils/tex_file_writing.py:text_to_dvi function, I think this is where the problem is: something went wrong when parsing the IntegerMatrix’s brackets string and got it into the text_file variable.

opening C:\Users\ADMINI~1\AppData\Local\Temp\Tex\end{array}\right]"
ERROR:root:

 LaTeX Error!  Not a worry, it happens to the best of us.

Traceback (most recent call last):
  File "D:\Program Files\Python3\Scripts\manimgl-script.py", line 33, in <module>
    sys.exit(load_entry_point('manimgl', 'console_scripts', 'manimgl')())
  File "d:\public\manim\manimlib\__main__.py", line 17, in main
    scene.run()
  File "d:\public\manim\manimlib\scene\scene.py", line 75, in run
    self.construct()
  File "example_scenes.py", line 29, in construct
    IntegerMatrix(matrix, include_background_rectangle=True),
  File "d:\public\manim\manimlib\mobject\matrix.py", line 81, in __init__
    self.add_brackets()
  File "d:\public\manim\manimlib\mobject\matrix.py", line 111, in add_brackets
    bracket_pair = Tex("".join([
  File "d:\public\manim\manimlib\mobject\svg\tex_mobject.py", line 167, in __init__
    super().__init__(full_string, **kwargs)
  File "d:\public\manim\manimlib\mobject\svg\tex_mobject.py", line 42, in __init__
    filename = tex_to_svg_file(full_tex)
  File "d:\public\manim\manimlib\utils\tex_file_writing.py", line 54, in tex_to_svg_file
    tex_to_svg(tex_file_content, svg_file)
  File "d:\public\manim\manimlib\utils\tex_file_writing.py", line 62, in tex_to_svg
    svg_file = dvi_to_svg(tex_to_dvi(tex_file))
  File "d:\public\manim\manimlib\utils\tex_file_writing.py", line 97, in tex_to_dvi
    with open(log_file, "r") as file:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\Tex\\cf5d7f9f2e57398a.log'

Environment

OS System: Windows 10 manim version: master python version: 3.9.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8

github_iconTop GitHub Comments

2reactions
christian-robinsoncommented, Mar 17, 2021

I’m getting the same error. I have

I had the same problem. And today I finally solved it. You have “~” sign in your directory name. I have changed my path and some modified the source code and then it worked for me.

Can you share the changes you made to the path/source code?

0reactions
ArmZamcommented, May 3, 2022

Hi,

Sorry for adding to a closed ticket but if you face this issue too, there is a simpler solution which is to specify a temp path in the manim config (<PATH_TO_MANIM_SRC>/manimlib/default_config.yml). You’ll find a parameter named “temporary_storage”, just give a valid path for this one.

If not present the librairy will fetch this from your TMP environment variable, which may contains a ~ causing this issue, by providing the path you bypass this problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

input{} File does not exist [duplicate] - LaTeX Stack Exchange
tex, it seems to find entries.tex, but not the files that entries.tex includes. The output of it looks like this: python3 entries.py pdflatex ......
Read more >
Adding text into .tex file with python - Stack Overflow
I'm using Windows not Linux. What I managed to do is: f = open("xxx.tex","a") ...
Read more >
Writing custom viewer states in Python - SideFX
To see viewer states in action, check out the demo scene and asset files under $HH/viewer_states/examples . These samples provide a detailed coverage...
Read more >
Tips and Tricks for Troubleshooting LaTeX - Overleaf
Try moving \end{document}​​ If you still haven't narrowed it down, try this little tip. Cut the text: \end{document} from the very end of...
Read more >
Common Mistakes that cause Automated Processing to Fail
Why does my submission fail to recognize the main tex file? ... During file upload these examples will be programmatically converted to an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found