Skip to content

Write is not working if a part is empty #3370

Closed
@tobiasBora

Description

@tobiasBora

Description of bug / unexpected behavior

Consider this code:

class Debug(ThreeDScene):
    def construct(self):
        t0 = MathTex(r"{{ \mathsf{return} }} \  {{ z }}")
        t1 = MathTex(r"{{ \mathsf{return} }} + {{z}}")
        VGroup(t0,t1).arrange(DOWN)
        self.play(Write(t0))
        self.play(Write(t1))
        self.wait(2)

Expected behavior

I would expect both lines to print the z.

Observed behavior

Yet, I only see the z on the second line. It seems like if I enclose all terms in my equation and that only empty elements are left, then only the first group is displayed. This is also seen in the bot in discord https://discord.com/channels/581738731934056449/1019649969596153968/threads/1153663738717679728

How to reproduce the issue

Code for reproducing the problem
class Debug(ThreeDScene):
    def construct(self):
        t0 = MathTex(r"{{ \mathsf{return} }} \  {{ z }}")
        t1 = MathTex(r"{{ \mathsf{return} }} + {{z}}")
        VGroup(t0,t1).arrange(DOWN)
        self.play(Write(t0))
        self.play(Write(t1))
        self.wait(2)

Additional media files

Images/GIFs
scriptoutput.mp4

Logs

Terminal output
Manim Community v0.16.0.post0

[09/19/23 14:11:33] DEBUG    Hashing ...                                                                                                                                                            hashing.py:343
                    DEBUG    Hashing done in 0.033854 s.                                                                                                                                            hashing.py:355
                    DEBUG    Hash generated :  464293708_920551792_223132457                                                                                                                        hashing.py:358
                    INFO     Animation 0 : Using cached data (hash : 464293708_920551792_223132457)                                                                                           cairo_renderer.py:75
                    DEBUG    List of the first few animation hashes of the scene: ['464293708_920551792_223132457']                                                                           cairo_renderer.py:84
                    DEBUG    Hashing ...                                                                                                                                                            hashing.py:343
                    DEBUG    Hashing done in 0.043908 s.                                                                                                                                            hashing.py:355
                    DEBUG    Hash generated :  450002260_815086484_120912710                                                                                                                        hashing.py:358
                    DEBUG    List of the first few animation hashes of the scene: ['464293708_920551792_223132457', '450002260_815086484_120912710']                                          cairo_renderer.py:84
[09/19/23 14:11:34] INFO     Animation 1 : Partial movie file written in                                                                                                                  scene_file_writer.py:514
                             '480p15/partial_movie_f                         
                             iles/Debug/450002260_815086484_120912710.mp4'                                                                                                                                        
                    DEBUG    Animation with empty mobject                                                                                                                                         animation.py:173
                    DEBUG    Hashing ...                                                                                                                                                            hashing.py:343
                    DEBUG    Hashing done in 0.037911 s.                                                                                                                                            hashing.py:355
                    DEBUG    Hash generated :  450002260_88469787_549839834                                                                                                                         hashing.py:358
                    DEBUG    List of the first few animation hashes of the scene: ['464293708_920551792_223132457', '450002260_815086484_120912710', '450002260_88469787_549839834']          cairo_renderer.py:84
                    INFO     Animation 2 : Partial movie file written in                                                                                                                  scene_file_writer.py:514
                             '480p15/partial_movie_files/Debug/450002260_88469787_549839834.mp4'                                                                                                                                         
                    INFO     Combining to Movie file.                                                                                                                                     scene_file_writer.py:607
                    DEBUG    Partial movie files to combine (3 files):                                                                                                                    scene_file_writer.py:548
                             ['480p15/partial_movie_                         
                             files/Debug/464293708_920551792_223132457.mp4',                                                                                                                                      
                             '480p15/partial_movie_f                         
                             iles/Debug/450002260_815086484_120912710.mp4',                                                                                                                                       
                             '480p15/partial_movie_f                         
                             iles/Debug/450002260_88469787_549839834.mp4']                                                                                                                                        
                    INFO                                                                                                                                                                  scene_file_writer.py:728
                             File ready at                                                                                                                                                                        
                             '480p15/Debug.mp4'                              
                                                                                                                                                                                                                  
                    INFO     Rendered Debug                                                                                                                                                           scene.py:240
                             Played 3 animations                                                                                                                                                                  
                    INFO     Previewed File at:                                                                                                                                                    file_ops.py:224
                             '/home/leo/Documents/Cours/2022_-_Postdoc_Amsterdam/Enseignement/2023_-_Modern_crypto/Animations/media/videos/2023_09_19_-_pseudo_otp/480p15/Debug.mp4'                              
You are using manim version v0.16.0.post0, but version v0.17.3 is available.
You should consider upgrading via pip install -U manim

System specifications

System Details
  • OS NixOs
  • RAM: enough
  • Python version (python/py/python3 --version): 3.10.9
  • Installed modules (provide output from pip list): not installed via pip
FFMPEG

Output of ffmpeg -version:

ffmpeg version 4.4.3 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 11.3.0 (GCC)
configuration: --disable-static --prefix=/nix/store/rgcvvkwmhng2zlxpj55p58dhhn1y8w9h-ffmpeg-full-4.4.3 --target_os=linux --arch=x86_64 --enable-gpl --enable-version3 --disable-nonfree --enable-shared --enable-pic --disable-small --enable-runtime-cpudetect --disable-lto --enable-gray --enable-swscale-alpha --enable-hardcoded-tables --enable-safe-bitstream-reader --enable-pthreads --disable-w32threads --disable-os2threads --enable-network --enable-pixelutils --enable-ffmpeg --enable-ffplay --enable-ffprobe --enable-avcodec --enable-avdevice --enable-avfilter --enable-avformat --enable-avutil --enable-postproc --enable-swresample --enable-swscale --enable-doc --disable-htmlpages --enable-manpages --disable-podpages --disable-txtpages --enable-bzlib --enable-libcelt --enable-cuda --enable-cuda-llvm --enable-libdav1d --disable-libfdk-aac --disable-libflite --enable-fontconfig --enable-libfreetype --enable-frei0r --enable-libfribidi --enable-libgme --enable-gnutls --enable-libgsm --enable-ladspa --enable-libmp3lame --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libdc1394 --enable-libdrm --enable-iconv --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmysofa --enable-libopenmpt --enable-libopus --enable-librsvg --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-vaapi --enable-vdpau --enable-libvorbis --enable-libvmaf --enable-libvpx --enable-libwebp --enable-xlib --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-libxcb-shape --enable-libxml2 --enable-lzma --enable-cuvid --enable-nvdec --enable-nvenc --enable-openal --enable-opencl --enable-libopencore-amrnb --disable-opengl --enable-libopenh264 --enable-libopenjpeg --disable-openssl --enable-libpulse --enable-librav1e --enable-libsvtav1 --disable-librtmp --enable-sdl2 --enable-libsoxr --enable-libspeex --enable-libvidstab --enable-libvo-amrwbenc --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzmq --enable-libzimg --enable-zlib --enable-vulkan --enable-libglslang --enable-libsmbclient --disable-debug --enable-optimizations --disable-extra-warnings --disable-stripping
libavutil      56. 70.100 / 56. 70.100
libavcodec     58.134.100 / 58.134.100
libavformat    58. 76.100 / 58. 76.100
libavdevice    58. 13.100 / 58. 13.100
libavfilter     7.110.100 /  7.110.100
libswscale      5.  9.100 /  5.  9.100
libswresample   3.  9.100 /  3.  9.100
libpostproc    55.  9.100 / 55.  9.100

Additional comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    🆕 New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions