manim: "UserWarning: g0-65 not recognized" and wrong renderization of text

Hi, I just installed manim from pip in Ubuntu 20.04.1 LTS ($ sudo pip3 install manimlib). I have a full stack TexLive installation (as of $ sudo apt install texlive-full), but it seems that I keep getting bad output from the OpeningManimExample in example_scenes.py. Specifically, I get the following output:

➜  ~ manim example_scenes.py -pl --leave_progress_bars
Media will be written to ./media/. You can change this behavior with the --media_dir flag.
1: FirstScene
2: OpeningManimExample
3: SquareToCircle
4: UpdatersExample
5: WarpSquare
6: WriteStuff

Choose number corresponding to desired scene/arguments.
(Use comma separated list for multiple entries)
Choice(s): 2
/usr/local/lib/python3.8/dist-packages/manimlib/mobject/svg/svg_mobject.py:125: UserWarning: g0-65 not recognized
  warnings.warn("%s not recognized" % ref)
Animation 0: WriteTextMobject, etc.: 100%|██████| 15/15 [00:00<00:00, 53.26it/s]
Animation 2: TransformTextMobject, etc.: 100%|██| 15/15 [00:00<00:00, 50.20it/s]
Animation 4: FadeOutTextMobject, etc.: 100%|████| 45/45 [00:01<00:00, 35.59it/s]
/usr/local/lib/python3.8/dist-packages/manimlib/mobject/svg/svg_mobject.py:125: UserWarning: g0-45 not recognized
  warnings.warn("%s not recognized" % ref)
/usr/local/lib/python3.8/dist-packages/manimlib/mobject/svg/svg_mobject.py:125: UserWarning: g0-108 not recognized
  warnings.warn("%s not recognized" % ref)
/usr/local/lib/python3.8/dist-packages/manimlib/mobject/svg/svg_mobject.py:125: UserWarning: g0-117 not recognized
  warnings.warn("%s not recognized" % ref)
Animation 6: MoveToTargetNumberPlane: 100%|█████| 45/45 [00:01<00:00, 23.13it/s]
Animation 8: TransformTextMobject: 100%|████████| 15/15 [00:00<00:00, 34.53it/s]

File ready at /home/schneider/media/videos/example_scenes/480p15/OpeningManimExample.mp4

Played 10 animations

Observe the bunch of UserWarning: g0-65 not recognized warnings that are coming from svg_mobject.py. Besides, I get weird output in two different pieces of text, see screenshots below:

Captura de tela de 2020-09-28 21-20-55

Captura de tela de 2020-09-28 21-21-15

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 18 (1 by maintainers)

Commits related to this issue

Most upvoted comments

@codingwithmagga My error looks like this:

  warnings.warn("%s not recognized" % ref)
C:\Users\TYVM\manim\manimlib\mobject\svg\svg_mobject.py:125: UserWarning: g0-104 not recognized
  warnings.warn("%s not recognized" % ref)
C:\Users\TYVM\manim\manimlib\mobject\svg\svg_mobject.py:125: UserWarning: g0-105 not recognized
  warnings.warn("%s not recognized" % ref)
C:\Users\TYVM\manim\manimlib\mobject\svg\svg_mobject.py:125: UserWarning: g0-115 not recognized
  warnings.warn("%s not recognized" % ref)
C:\Users\TYVM\manim\manimlib\mobject\svg\svg_mobject.py:125: UserWarning: g0-97 not recognized
  warnings.warn("%s not recognized" % ref)
C:\Users\TYVM\manim\manimlib\mobject\svg\svg_mobject.py:125: UserWarning: g0-114 not recognized
  warnings.warn("%s not recognized" % ref)
C:\Users\TYVM\manim\manimlib\mobject\svg\svg_mobject.py:125: UserWarning: g0-101 not recognized
  warnings.warn("%s not recognized" % ref)
C:\Users\TYVM\manim\manimlib\mobject\svg\svg_mobject.py:125: UserWarning: g0-103 not recognized
  warnings.warn("%s not recognized" % ref)
C:\Users\TYVM\manim\manimlib\mobject\svg\svg_mobject.py:125: UserWarning: g0-117 not recognized
  warnings.warn("%s not recognized" % ref)
C:\Users\TYVM\manim\manimlib\mobject\svg\svg_mobject.py:125: UserWarning: g0-108 not recognized
  warnings.warn("%s not recognized" % ref)
C:\Users\TYVM\manim\manimlib\mobject\svg\svg_mobject.py:125: UserWarning: g0-116 not recognized
  warnings.warn("%s not recognized" % ref)
C:\Users\TYVM\manim\manimlib\mobject\svg\svg_mobject.py:125: UserWarning: g0-120 not recognized
  warnings.warn("%s not recognized" % ref)



Traceback (most recent call last):
  File "C:\Users\TYVM\manim\manimlib\extract_scene.py", line 155, in main
    scene = SceneClass(**scene_kwargs)
  File "C:\Users\TYVM\manim\manimlib\scene\scene.py", line 75, in __init__
    self.construct()
  File "tutorial/1_text_format.py", line 5, in construct
    text = TextMobject("This is a regular text")
  File "C:\Users\TYVM\manim\manimlib\mobject\svg\tex_mobject.py", line 150, in __init__
    self.break_up_by_substrings()
  File "C:\Users\TYVM\manim\manimlib\mobject\svg\tex_mobject.py", line 190, in break_up_by_substrings
    sub_tex_mob.move_to(self.submobjects[last_submob_index], RIGHT)
IndexError: list index out of range```

Win10 19042, MikTeX CurrentVersion 21.1, SetupVersion 2.9

I fixed the same issue on my Windows 10 installation with MiKTeX by installing the cm-super package (and was able to recreate the error by uninstalling the package)

Confirmed. Thanks 😃

I will double check, but i thought the complete package from net installer fixed it 😕

In almost all cases it works. There are only a very few cases where it fails, at least on my computer. Sometimes it was enough to delete the *.svg and run manim again. The command from manim for dvisvgm looks like this

dvisvgm "/full_path_to_dvi/c4626eca017672c1.dvi" -n -v 0 -o "/full_path_to_dvi/Tex/c4626eca017672c1.svg" > /dev/null

-v 0 just suppress the output from dvisvgm -o defines the ouput

I have to say that this error didn’t occur anymore in my case. I tried to install some additional fonts but I’m not sure if it really solves the problem or I’m just lucky now, because I wasn’t able to recreate the error.

I tried to follow my steps and these are some things I did:

  • update dvisvgm
  • install texlive-fonts-extra
  • install cm-super

@AEX-DOS it is the same issue schneiderfelipe mentioned. The conversions from dvi to svg fails or at least partly fails, and some letters, symbols etc. are not converted correctly. When manim is looking for that letter in the svg file it can’t found it. That produces the error. Remark: This doesn’t have to be 100% correct, but I think in general that is what’s happening here. One solution is to delete the “wrong/failed” svg file and convert it manually as I mentioned above.

Just be curious: Do you use Ubuntu 20.04 too?

Hi I have the same issue on Ubuntu 20.04 too. The conversion from dvi to svg seems to fail, but I couldn’t figure out why. My current workaround is to delete the “wrong” svg files and run the following command manually

dvisvgm 8c108d7b672013f3.dvi -n

where you have to replace the dvi file with the one you need.