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.

Exception: Latex error converting to dvi.

See original GitHub issue

Hi. When I installed Manim, I first tried to render an animation to see if it works. I first issued the command below to render the Square to Circle example, and it did well. python3 ./manim.py example_scenes.py SquareToCircle -pl But, whenever I try to render the other examples provided, it always makes the same error. Exception: Latex error converting to dvi. See log output above or the log file: media/Tex/664e80e8d8d98482.log Command issued : sudo -H python3 -m manim example_scenes.py OpeningManimExample -pl This is the complete console log :

Media will be written to ./media/. You can change this behavior with the --media_dir flag.
latex: warning: running with administrator privileges

Sorry, but latex did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  /var/root/Library/Application Support/MiKTeX/texmfs/data/miktex/log/latex.log



Traceback (most recent call last):
  File "/Users/mac/Downloads/manim-master/manimlib/extract_scene.py", line 155, in main
    scene = SceneClass(**scene_kwargs)
  File "/Users/mac/Downloads/manim-master/manimlib/scene/scene.py", line 53, in __init__
    self.construct()
  File "example_scenes.py", line 20, in construct
    title = TextMobject("This is some \\LaTeX")
  File "/Users/mac/Downloads/manim-master/manimlib/mobject/svg/tex_mobject.py", line 147, in __init__
    SingleStringTexMobject.__init__(
  File "/Users/mac/Downloads/manim-master/manimlib/mobject/svg/tex_mobject.py", line 42, in __init__
    file_name = tex_to_svg_file(
  File "/Users/mac/Downloads/manim-master/manimlib/utils/tex_file_writing.py", line 20, in tex_to_svg_file
    dvi_file = tex_to_dvi(tex_file)
  File "/Users/mac/Downloads/manim-master/manimlib/utils/tex_file_writing.py", line 70, in tex_to_dvi
    raise Exception(
Exception: Latex error converting to dvi. See log output above or the log file: media/Tex/664e80e8d8d98482.log

I tried to search on google for any help, but all the that I read was about the same issue but on Windows, and I’m on mac. However, I continued searching and found this on StackOverflow :

That answer is no longer useful now because Manim has already solved that problem. So this may be due to two things: To give us a hint of what is wrong, go to the manimlib folder with the terminal and run the following:

latex tex_template.tex We distinguish the two possible errors:

Recognized the latex command but the compilation could not be completed because you are missing libraries, to solve this you can install the missing packages indicated by the terminal.

That LaTeX is not recognized as a command, in this case surely the PATH variable is not set correctly, here is the solution.

So I went to the manimlib folder and issued the following : latex tex_template.tex. And judging by the console log, it doesn’t seem like its the second option because the latex command was recognized, but there is no further information about what’s missing. This is the complete console log :

MacBook-Pro-de-MAC:manimlib mac$ latex tex_template.tex
log4cxx: setFile(/Users/mac/Library/Application Support/MiKTeX/texmfs/data/miktex/log/latex.log,true) call failed.
log4cxx: IO Exception : status code = 13
log4cxx: No output stream or file set for the appender named [RollingLogFile].
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7250)

Sorry, but latex did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  /Users/mac/Library/Application Support/MiKTeX/texmfs/data/miktex/log/latex.log
MacBook-Pro-de-MAC:manimlib mac$ latex tex_template.tex
log4cxx: setFile(/Users/mac/Library/Application Support/MiKTeX/texmfs/data/miktex/log/latex.log,true) call failed.
log4cxx: IO Exception : status code = 13
log4cxx: No output stream or file set for the appender named [RollingLogFile].
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7250)

Sorry, but latex did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  /Users/mac/Library/Application Support/MiKTeX/texmfs/data/miktex/log/latex.log
MacBook-Pro-de-MAC:manimlib mac$ latex tex_template.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7250)

Sorry, but latex did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  /Users/mac/Library/Application Support/MiKTeX/texmfs/data/miktex/log/latex.log

So I went to see what’s on the latex.log file, and found this :

2020-01-28 21:28:52,077+0100 INFO  texworks - starting: MiKTeX TeXworks 0.6.3 (MiKTeX 2.9.7250)
2020-04-08 17:31:28,130+0100 INFO  latex - starting with command line: latex tex_template.tex
2020-04-08 17:31:28,135+0100 INFO  latex - allowing known shell commands
2020-04-08 17:31:28,135+0100 INFO  latex - enabling input (output) from (to) processes
2020-04-08 17:31:28,151+0100 INFO  latex - going to create file: latex.fmt
2020-04-08 17:31:29,772+0100 ERROR latex - /usr/local/bin/initexmf did not succeed; exitCode: 1
2020-04-08 17:31:29,772+0100 ERROR latex - output:
2020-04-08 17:31:29,772+0100 ERROR latex - log4cxx: setFile(/Users/mac/Library/Application Support/MiKTeX/texmfs/data/miktex/log/initexmf.log,true) call failed.
log4cxx: IO Exception : status code = 13
log4cxx: No output stream or file set for the appender named [RollingLogFile].

Sorry, but "MiKTeX Configuration Utility" did not succeed.

The log file hopefully contains the information to get MiKTeX going again:

  /Users/mac/Library/Application Support/MiKTeX/texmfs/data/miktex/log/initexmf.log

2020-04-08 17:31:29,774+0100 FATAL latex - The memory dump file could not be found.
2020-04-08 17:31:29,774+0100 INFO  latex - finishing with exit code 1

But I have no clue what to do. Will appreciate the help.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:12

github_iconTop GitHub Comments

3reactions
DaliborCimrcommented, May 25, 2020

Latex error converting to dvi has more than one thread in this repo. I tried every option which is mentioned here on git and the final solution was to use other distribution then MiKTeX (https://www.latex-project.org/get/), concretely TeX Live. After uninstall of MiKTeX, install Tex Live and restart my computer, everything works fine.

1reaction
tai9856commented, Apr 25, 2020

I had a same problem with you. And I fix that by adding package \usepackage{ucs} in tex file tex_template (manimlib/tex_template). I hope that help you fix this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Exception: Latex error converting to dvi. See log output above ...
I'd recommend trying to compile the Tex file from the command line, or using a graphical tool if you have one, so that...
Read more >
Latex error converting to dvi : r/manim - Reddit
Sorry if this has been asked before but Im currently facing an issue with latex. Exception: Latex error converting to dvi. See log...
Read more >
Issues with Manim. 'error converting to dvi.' - Stack Overflow
That LaTeX is not recognized as a command, in this case surely the PATH variable is not set correctly, here is the solution....
Read more >
manim踩雷的解决方法整理_becatjd的博客
Exception : Latex error converting to dvi. 报错01 然后我找到了一些帖子. Issuse with Manim.'error converting to dvi.' error converting to dvi
Read more >
Source code for manim.utils.tex_file_writing - Docs
"""Interface for writing, compiling, and converting ``.tex`` files. .. SEEALSO:: :mod:`.mobject.svg.tex_mobject` """ from __future__ import annotations ...
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