Skip to content

Nondeterministic build failures in Tex('The horse does not eat cucumber salad.') #1081

@markromanmiller

Description

@markromanmiller

Description of bug / unexpected behavior

As I've been figuring out the test coverage toolset for Manim, I've done quite a lot of automated builds on a copied (not forked) repository (https://github.com/MrMallIronmaker/manim-cov/). For some reason, occasionally one of the Ubuntu builds fails while I've been playing around with coverage settings. Whether it's 3.7, 3.8, or 3.9 is apparently random.

All of them fail in the Tex doctest.

Expected behavior

It should pass the test.

How to reproduce the issue

Code for reproducing the problem In theory the problematic code is here: ```py Tex('The horse does not eat cucumber salad.') ```

However, I've not been able to replicate this issue

Additional media files

Build output
Run poetry run pytest --cov-append --doctest-modules manim
  poetry run pytest --cov-append --doctest-modules manim
  shell: /usr/bin/bash -e {0}
  env:
    POETRY_VIRTUALENVS_CREATE: false
    pythonLocation: /opt/hostedtoolcache/Python/3.8.8/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.8/x64/lib
Skipping virtualenv creation, as specified in config file.
============================= test session starts ==============================
platform linux -- Python 3.8.8, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
rootdir: /home/runner/work/manim-cov/manim-cov, configfile: pyproject.toml
plugins: cov-2.11.1
collected 30 items

manim/_config/__init__.py .                                              [  3%]
manim/_config/utils.py ..                  
## Logs
<details><summary>Terminal output</summary>
<!-- Add "-v DEBUG" when calling manim to generate more detailed logs -->

PASTE HERE OR PROVIDE LINK TO https://pastebin.com/ OR SIMILAR


<!-- Insert screenshots here (only when absolutely necessary, we prefer copy/pasted output!) -->

</details>


## System specifications

<details><summary>System Details</summary>

- OS (with version, e.g Windows 10 v2004 or macOS 10.15 (Catalina)):
- RAM:
- Python version (`python/py/python3 --version`):
- Installed modules (provide output from `pip list`):

PASTE HERE


</details>

<details><summary>LaTeX details</summary>

+ LaTeX distribution (e.g. TeX Live 2020):
+ Installed LaTeX packages:
<!-- output of `tlmgr list --only-installed` for TeX Live or a screenshot of the Packages page for MikTeX -->
</details>

<details><summary>FFMPEG</summary>

Output of `ffmpeg -version`:

PASTE HERE

</details>

## Additional comments
<!-- Add further context that you think might be relevant for this issue here. -->
                              [ 10%]
manim/animation/animation.py .                                           [ 13%]
manim/mobject/geometry.py .........                                      [ 43%]
manim/mobject/mobject.py ......                                          [ 63%]
manim/mobject/svg/tex_mobject.py ..F                                     [ 73%]
manim/mobject/svg/text_mobject.py ...                                    [ 83%]
manim/mobject/types/vectorized_mobject.py ....                           [ 96%]
manim/utils/color.py .                                                   [100%]

=================================== FAILURES ===================================
_________________ [doctest] manim.mobject.svg.tex_mobject.Tex __________________
491 A string compiled with LaTeX in normal mode.
492 
493     Tests
494     -----
495 
496     Check whether writing a LaTeX string works::
497 
498         >>> Tex('The horse does not eat cucumber salad.')
UNEXPECTED EXCEPTION: IndexError('list index out of range')
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/doctest.py", line 1336, in __run
    exec(compile(example.source, filename, "single",
  File "<doctest manim.mobject.svg.tex_mobject.Tex[0]>", line 1, in <module>
  File "/home/runner/work/manim-cov/manim-cov/manim/mobject/svg/tex_mobject.py", line 506, in __init__
    MathTex.__init__(
  File "/home/runner/work/manim-cov/manim-cov/manim/mobject/svg/tex_mobject.py", line 392, in __init__
    self.break_up_by_substrings()
  File "/home/runner/work/manim-cov/manim-cov/manim/mobject/svg/tex_mobject.py", line 434, in break_up_by_substrings
    sub_tex_mob.move_to(self.submobjects[last_submob_index], RIGHT)
IndexError: list index out of range
/home/runner/work/manim-cov/manim-cov/manim/mobject/svg/tex_mobject.py:498: UnexpectedException
----------------------------- Captured stdout call -----------------------------
                    INFO     Writing "The horse does not  tex_file_writing.py:81
                             eat cucumber salad." to medi                       
                             a/Tex/3ecc83aec1683253.tex                         
------------------------------ Captured log call -------------------------------
INFO     manim:tex_file_writing.py:81 Writing "The horse does not eat cucumber salad." to media/Tex/3ecc83aec1683253.tex
=============================== warnings summary ===============================
manim/mobject/mobject.py::manim.mobject.mobject.Mobject.set
  <doctest manim.mobject.mobject.Mobject.set[1]>:1: DeprecationWarning: This method is not guaranteed to stay around. Please prefer setting the attribute normally or with Mobject.set().

manim/mobject/mobject.py::manim.mobject.mobject.Mobject.set
  <doctest manim.mobject.mobject.Mobject.set[2]>:1: DeprecationWarning: This method is not guaranteed to stay around. Please prefer getting the attribute normally.

manim/mobject/svg/tex_mobject.py::manim.mobject.svg.tex_mobject.Tex
  /home/runner/work/manim-cov/manim-cov/manim/mobject/svg/svg_mobject.py:261: UserWarning: media/Tex/3ecc83aec1683253.svg contains a reference to id #g0-84, which is not recognized
    warnings.warn(warning_text)

manim/mobject/svg/tex_mobject.py::manim.mobject.svg.tex_mobject.Tex
  /home/runner/work/manim-cov/manim-cov/manim/mobject/svg/svg_mobject.py:261: UserWarning: media/Tex/3ecc83aec1683253.svg contains a reference to id #g0-104, which is not recognized
    warnings.warn(warning_text)

manim/mobject/svg/tex_mobject.py::manim.mobject.svg.tex_mobject.Tex
  /home/runner/work/manim-cov/manim-cov/manim/mobject/svg/svg_mobject.py:261: UserWarning: media/Tex/3ecc83aec1683253.svg contains a reference to id #g0-101, which is not recognized
    warnings.warn(warning_text)

manim/mobject/svg/tex_mobject.py::manim.mobject.svg.tex_mobject.Tex
  /home/runner/work/manim-cov/manim-cov/manim/mobject/svg/svg_mobject.py:261: UserWarning: media/Tex/3ecc83aec1683253.svg contains a reference to id #g0-111, which is not recognized
    warnings.warn(warning_text)

manim/mobject/svg/tex_mobject.py::manim.mobject.svg.tex_mobject.Tex
  /home/runner/work/manim-cov/manim-cov/manim/mobject/svg/svg_mobject.py:261: UserWarning: media/Tex/3ecc83aec1683253.svg contains a reference to id #g0-114, which is not recognized
    warnings.warn(warning_text)

manim/mobject/svg/tex_mobject.py::manim.mobject.svg.tex_mobject.Tex
  /home/runner/work/manim-cov/manim-cov/manim/mobject/svg/svg_mobject.py:261: UserWarning: media/Tex/3ecc83aec1683253.svg contains a reference to id #g0-115, which is not recognized
    warnings.warn(warning_text)

manim/mobject/svg/tex_mobject.py::manim.mobject.svg.tex_mobject.Tex
  /home/runner/work/manim-cov/manim-cov/manim/mobject/svg/svg_mobject.py:261: UserWarning: media/Tex/3ecc83aec1683253.svg contains a reference to id #g0-100, which is not recognized
    warnings.warn(warning_text)

manim/mobject/svg/tex_mobject.py::manim.mobject.svg.tex_mobject.Tex
  /home/runner/work/manim-cov/manim-cov/manim/mobject/svg/svg_mobject.py:261: UserWarning: media/Tex/3ecc83aec1683253.svg contains a reference to id #g0-110, which is not recognized
    warnings.warn(warning_text)

manim/mobject/svg/tex_mobject.py::manim.mobject.svg.tex_mobject.Tex
  /home/runner/work/manim-cov/manim-cov/manim/mobject/svg/svg_mobject.py:261: UserWarning: media/Tex/3ecc83aec1683253.svg contains a reference to id #g0-116, which is not recognized
    warnings.warn(warning_text)

manim/mobject/svg/tex_mobject.py::manim.mobject.svg.tex_mobject.Tex
  /home/runner/work/manim-cov/manim-cov/manim/mobject/svg/svg_mobject.py:261: UserWarning: media/Tex/3ecc83aec1683253.svg contains a reference to id #g0-97, which is not recognized
    warnings.warn(warning_text)

manim/mobject/svg/tex_mobject.py::manim.mobject.svg.tex_mobject.Tex
  /home/runner/work/manim-cov/manim-cov/manim/mobject/svg/svg_mobject.py:261: UserWarning: media/Tex/3ecc83aec1683253.svg contains a reference to id #g0-99, which is not recognized
    warnings.warn(warning_text)

manim/mobject/svg/tex_mobject.py::manim.mobject.svg.tex_mobject.Tex
  /home/runner/work/manim-cov/manim-cov/manim/mobject/svg/svg_mobject.py:261: UserWarning: media/Tex/3ecc83aec1683253.svg contains a reference to id #g0-117, which is not recognized
    warnings.warn(warning_text)

manim/mobject/svg/tex_mobject.py::manim.mobject.svg.tex_mobject.Tex
  /home/runner/work/manim-cov/manim-cov/manim/mobject/svg/svg_mobject.py:261: UserWarning: media/Tex/3ecc83aec1683253.svg contains a reference to id #g0-109, which is not recognized
    warnings.warn(warning_text)

manim/mobject/svg/tex_mobject.py::manim.mobject.svg.tex_mobject.Tex
  /home/runner/work/manim-cov/manim-cov/manim/mobject/svg/svg_mobject.py:261: UserWarning: media/Tex/3ecc83aec1683253.svg contains a reference to id #g0-98, which is not recognized
    warnings.warn(warning_text)

manim/mobject/svg/tex_mobject.py::manim.mobject.svg.tex_mobject.Tex
  /home/runner/work/manim-cov/manim-cov/manim/mobject/svg/svg_mobject.py:261: UserWarning: media/Tex/3ecc83aec1683253.svg contains a reference to id #g0-108, which is not recognized
    warnings.warn(warning_text)

manim/mobject/svg/tex_mobject.py::manim.mobject.svg.tex_mobject.Tex
  /home/runner/work/manim-cov/manim-cov/manim/mobject/svg/svg_mobject.py:261: UserWarning: media/Tex/3ecc83aec1683253.svg contains a reference to id #g0-46, which is not recognized
    warnings.warn(warning_text)

-- Docs: https://docs.pytest.org/en/stable/warnings.html

----------- coverage: platform linux, python 3.8.8-final-0 -----------
Coverage XML written to file coverage.xml

=========================== short test summary info ============================
FAILED manim/mobject/svg/tex_mobject.py::manim.mobject.svg.tex_mobject.Tex
================== 1 failed, 29 passed, 18 warnings in 6.56s ===================
Error: Process completed with exit code 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    infrastructureAnything related to our infrastructure

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions