ManimCommunity / manim

A community-maintained Python framework for creating mathematical animations.
https://www.manim.community
MIT License
26.3k stars 1.8k forks source link

IndexError when using Text #905

Closed pinjuf closed 3 years ago

pinjuf commented 3 years ago

I'm trying to render a scene containing Text (using Tex/TextMobject), but I obtain the following error: File "C:\Users\Pinjuf\AppData\Local\Programs\Python\Python37\Scripts\manim\manim\manim\mobject\svg\tex_mobject.py", line 430, in break_up_by_substrings sub_tex_mob.move_to(self.submobjects[last_submob_index], RIGHT) IndexError: list index out of range

This appears to always happen when trying to use text (also in the example scripts). Also, warnings like this appears before the final error: C:\Users\Pinjuf\AppData\Local\Programs\Python\Python37\Scripts\manim\manim\manim\mobject\svg\svg_mobject.py:238: UserWarning: g0-107 not recognized warnings.warn("%s not recognized" % ref)

Here's the command I originally used: python -m manim scenes\texttest.py MyScene -p -q m

There's no final video output, but the standard folders are created ("partial_movie_files" etc.).

How to reproduce the issue

Code for reproducing the problem Just use the provided example code ("basic.py/OpeningManim").

System specifications

System Details - OS: Win 10 - RAM: 8GB - Python version: Python 3.7 - Installed modules (provide output from `pip list`): ``` -anim 0.2.0 -yyaml 5.1 aiohttp 3.6.2 altgraph 0.16.1 appdirs 1.4.3 asn1crypto 0.24.0 async-timeout 3.0.1 attrs 19.3.0 bcrypt 3.1.7 beautifulsoup4 4.8.0 blis 0.2.4 bs4 0.0.1 certifi 2019.6.16 cffi 1.12.3 chardet 3.0.4 ChatterBot 1.0.5 chatterbot-corpus 1.2.0 colorama 0.4.4 colour 0.1.5 commonmark 0.9.1 comtypes 1.1.7 cryptography 2.7 cycler 0.10.0 cymem 2.0.3 decorator 4.4.2 discord.py 1.3.2 distlib 0.3.0 ecdsa 0.13.2 esptool 2.6 et-xmlfile 1.0.1 fabric 2.5.0 fake-headers 1.0.2 ffmpeg 1.4 filelock 3.0.12 freeproxy 1.0.2 future 0.17.1 gevent 1.4.0 google 2.0.3 greenlet 0.4.15 h5py 2.10.0 hexdump 3.3 html5lib 1.0.1 idna 2.8 importlib-metadata 1.5.0 invoke 1.3.0 jdcal 1.4.1 Keras 2.3.1 Keras-Applications 1.0.8 Keras-Preprocessing 1.1.0 kiwisolver 1.3.1 llvmlite 0.35.0 manim 0.2.0 manimlib 0.1.11 manimpango 0.1.4 mathparse 0.1.2 matplotlib 3.3.3 mechanize 0.4.2 MouseInfo 0.1.2 mpmath 1.1.0 multidict 4.7.5 murmurhash 1.0.2 network 0.1 networkx 2.5 nltk 3.4.5 notify2 0.3.1 numba 0.52.0 numpy 1.16.4 opencv-python 4.1.1.26 openpyxl 3.0.0 paramiko 2.6.0 pbs 0.110 peewee 3.10.0 pefile 2019.4.18 Pillow 8.0.1 Pint 0.11 pip 20.1.1 pipenv 2018.11.26 plac 0.9.6 playsound 1.2.2 preshed 2.0.1 progressbar 2.5 protobuf 3.14.0 pt100 0.1 pyaes 1.6.1 PyAutoGUI 0.9.48 pycairo 1.20.0 pycparser 2.19 pydub 0.24.1 pygame 2.0.1 PyGetWindow 0.0.8 Pygments 2.7.3 pyinstall 0.1.4 pyinstaller 4.1.dev0+gbfc8b089 pyinstaller-hooks-contrib 2020.8 pymongo 3.10.1 PyMsgBox 1.0.6 PyNaCl 1.3.0 pyparsing 2.4.7 pypiwin32 223 pyreadline 2.1 PyRect 0.1.4 PyScreeze 0.1.25 pyserial 3.4 python-dateutil 2.7.5 pyttsx3 2.90 pytube3 9.6.4 PyTweening 1.0.3 pytz 2019.3 pyusb 1.0.2 pywin32 228 pywin32-ctypes 0.2.0 PyYAML 5.3 pyyml 0.0.2 requests 2.22.0 rich 6.2.0 scapy 2.4.3 scipy 1.3.0 selenium 3.141.0 setuptools 41.2.0 sh 1.12.14 six 1.12.0 soupsieve 1.9.3 sox 1.4.1 spacy 2.1.9 SQLAlchemy 1.2.19 srsly 1.0.2 sympy 1.4 thinc 7.0.8 torch 1.7.1 torchvision 0.3.0 tqdm 4.43.0 typing-extensions 3.7.4.2 urllib3 1.25.3 virtualenv 20.0.10 virtualenv-clone 0.5.3 wasabi 0.6.0 webencodings 0.5.1 websockets 8.1 wheel 0.33.4 wikipedia 1.4.0 win10toast 0.9 yarl 1.4.2 zipp 3.1.0 ```
LaTeX details + LaTeX distribution (e.g. TeX Live 2020): MiKTeX-pdfTeX 4.1 (MiKTeX 20.12)
FFMPEG Output of `ffmpeg -version`: ``` ffmpeg version 2021-01-01-git-63505fc60a-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers built with gcc 10.2.0 (Rev5, Built by MSYS2 project) configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint libavutil 56. 62.100 / 56. 62.100 libavcodec 58.115.102 / 58.115.102 libavformat 58. 65.100 / 58. 65.100 libavdevice 58. 11.103 / 58. 11.103 libavfilter 7. 94.100 / 7. 94.100 libswscale 5. 8.100 / 5. 8.100 libswresample 3. 8.100 / 3. 8.100 libpostproc 55. 8.100 / 55. 8.100 ```
## Additional comments
wurmfood commented 3 years ago

Take a look at bug #879 for information.