ManimCommunity / manim

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

self.add does not make any .mp4 file #1080

Closed Hansm-a closed 3 years ago

Hansm-a commented 3 years ago

**Disclaimer I'm from Korea, so my english might not be clear. I feel sorry for that.

Description of bug / unexpected behavior

I'm studying manim with nice examples in the example gallery, but I had an issue with using self.add(). I wanted to make a formula with this code.

class Formula(Scene):
    def construct(self):
        t = MathTex(r"\int_a^b f'(x) dx = f(b)- f(a)")
        self.add(t)

But when I executed that code with "manim example.py Formula -p", python shows me an error message as written below.

C:\Manim\manim-master\media\videos\example\1080p60\partial_movie_files\Test\partial_movie_file_list.txt: Invalid data found when processing input FileNotFoundError: [WinError 2] 지정된 파일을 찾을 수 없습니다(The specified file could not be found.): 'C:\Manim\manim-master\media\videos\example\1080p60\Formula.mp4'

But when I write self.play(Write(t)) instead of self.add(t), it worked well. How can I deal with this problem?

System specifications

System Details - OS (with version, e.g Windows 10 v2004 or macOS 10.15 (Catalina)): Windows10 - RAM: - Python version (`python/py/python3 --version`): Python 3.9.1 - Installed modules (provide output from `pip list`): ``` Package Version ------------------- -------- argon2-cffi 20.1.0 astroid 2.5 async-generator 1.10 attrs 20.3.0 backcall 0.2.0 bleach 3.3.0 cffi 1.14.5 colorama 0.4.4 colour 0.1.5 commonmark 0.9.1 cycler 0.10.0 decorator 4.4.2 defusedxml 0.6.0 entrypoints 0.3 glcontext 2.3.2 ipykernel 5.5.0 ipython 7.21.0 ipython-genutils 0.2.0 ipywidgets 7.6.3 isort 5.7.0 jedi 0.18.0 Jinja2 2.11.3 jsonschema 3.2.0 jupyter 1.0.0 jupyter-client 6.1.11 jupyter-console 6.2.0 jupyter-core 4.7.1 jupyterlab-pygments 0.1.2 jupyterlab-widgets 1.0.0 kiwisolver 1.3.1 lazy-object-proxy 1.5.2 manim 0.4.0 manimgl 1.0.0 ManimPango 0.2.4 mapbox-earcut 0.12.10 MarkupSafe 1.1.1 matplotlib 3.3.4 mccabe 0.6.1 mistune 0.8.4 moderngl 5.6.4 moderngl-window 2.3.0 mpmath 1.2.1 multipledispatch 0.6.0 nbclient 0.5.3 nbconvert 6.0.7 nbformat 5.1.2 nest-asyncio 1.5.1 networkx 2.5 nose 1.3.7 notebook 6.2.0 numpy 1.19.4 opencv-python 4.4.0.46 packaging 20.9 pandas 1.2.3 pandocfilters 1.4.3 parso 0.8.1 pickleshare 0.7.5 Pillow 8.0.1 pip 21.0.1 progressbar 2.5 prometheus-client 0.9.0 prompt-toolkit 3.0.16 pycairo 1.20.0 pycparser 2.20 pydub 0.24.1 pyglet 1.5.15 Pygments 2.7.3 pylint 2.6.0 PyOpenGL 3.1.5 pyparsing 2.4.7 pyreadline 2.1 pyrr 0.10.3 pyrsistent 0.17.3 python-dateutil 2.8.1 pytz 2021.1 pywin32 300 pywinpty 0.5.7 PyYAML 5.4.1 pyzmq 22.0.3 qtconsole 5.0.2 QtPy 1.9.0 rich 6.2.0 scipy 1.6.0 screeninfo 0.6.7 Send2Trash 1.5.0 setuptools 49.2.1 six 1.15.0 sympy 1.7.1 terminado 0.9.2 testpath 0.4.4 toml 0.10.2 tornado 6.1 tqdm 4.55.0 traitlets 5.0.5 typing-extensions 3.7.4.3 validators 0.18.2 wcwidth 0.2.5 webencodings 0.5.1 widgetsnbextension 3.5.1 wrapt 1.12.1 ```
LaTeX details + LaTeX distribution (e.g. TeX Live 2020): MikTeX + Installed LaTeX packages: MikTeX
FFMPEG Output of `ffmpeg -version`: ``` ffmpeg version 2021-02-28-git-85ab9deb98-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers ```
Darylgolden commented 3 years ago

In your first case, the Scene does not have any animations in it, so you must use -ps (renders as image instead of video). The second has a Write animation, so -p works fine.

Hansm-a commented 3 years ago

Thank You. I resolved the problem!