Skip to content

Issue running manim: m_array.py errors with typing.Tuple/typing.List/Any/... references. #26

Description

@rkhoury

Description of the bug

Under Windows, using the documentation in https://docs.manim.community/en/stable/installation/windows.html to grab the necessary dependencies and manim itself, as well as using pip to install this manim plugin, I then proceed to get m_array.py errors when attempting to run manim.exe (by itself or with any arguments). Theses errors are in the form:

Traceback (most recent call last):
  File "...\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "...\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "...\AppData\Local\Programs\Python\Python310\Scripts\manim.exe\__main__.py", line 4, in <module>
  File "...\AppData\Local\Programs\Python\Python310\lib\site-packages\manim\__init__.py", line 112, in <module>
    from .plugins import *
  File "...\AppData\Local\Programs\Python\Python310\lib\site-packages\manim\plugins\__init__.py", line 13, in <module>
    missing_plugins = requested_plugins - set(get_plugins().keys())
  File "...\AppData\Local\Programs\Python\Python310\lib\site-packages\manim\plugins\plugins_flags.py", line 19, in get_plugins
    plugins: dict[str, Any] = {
  File "...\AppData\Local\Programs\Python\Python310\lib\site-packages\manim\plugins\plugins_flags.py", line 20, in <dictcomp>
    entry_point.name: entry_point.load()
  File "...\AppData\Local\Programs\Python\Python310\lib\importlib\metadata\__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "...\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "...\AppData\Local\Programs\Python\Python310\lib\site-packages\manim_data_structures\__init__.py", line 3, in <module>
    from .m_array import *
  File "...\AppData\Local\Programs\Python\Python310\lib\site-packages\manim_data_structures\m_array.py", line 527, in <module>
    class MArray(VGroup):
  File "...\AppData\Local\Programs\Python\Python310\lib\site-packages\manim_data_structures\m_array.py", line 630, in MArray
    def __calc_label_pos_and_mob(self) -> typing.Tuple[Square, np.ndarray]:
AttributeError: module 'manim.typing' has no attribute 'Tuple'

and appear to hit for all typing.Tuple, typing.List, Any, (and perhaps more) references in the file.

Perhaps there's something wrong with my setup?

Logs

Terminal output (same stacktrace output as above)

System specifications

System Details
  • OS (with version, e.g., Windows 10 v2004 or macOS 10.15 (Catalina)): Win11 Version 23H2
  • RAM: 128GB
  • Python version (python/py/python3 --version): Python 3.10.4
  • Installed modules (provide output from pip list):
Package               Version
--------------------- -----------
astroid               2.11.5
autopep8              1.6.0
beautifulsoup4        4.12.2
bs4                   0.0.1
cchardet              2.1.7
click                 8.1.7
cloup                 3.0.5
colorama              0.4.4
decorator             5.1.1
dill                  0.3.5.1
glcontext             2.5.0
graphviz              0.20.1
isort                 5.10.1
isosurfaces           0.1.2
Jinja2                3.1.2
lazy-object-proxy     1.7.1
lxml                  4.9.2
manim                 0.18.1
manim-data-structures 0.1.7
manim-presentation    0.2.1
ManimPango            0.5.0
mapbox-earcut         1.0.1
markdown-it-py        3.0.0
MarkupSafe            2.1.1
mccabe                0.7.0
mdurl                 0.1.2
moderngl              5.10.0
moderngl-window       2.4.6
multipledispatch      1.0.0
mypy                  0.971
mypy-extensions       0.4.3
networkx              3.3
numpy                 1.26.0
opencv-python         4.10.0.84
parse                 1.19.0
pillow                10.4.0
pip                   24.2
platformdirs          2.5.2
pycairo               1.26.1
pycodestyle           2.8.0
pydub                 0.25.1
pyglet                2.0.16
Pygments              2.18.0
pylint                2.14.0
PyPDF2                2.6.0
pyrr                  0.10.3
rich                  13.7.1
scipy                 1.14.0
screeninfo            0.8.1
setuptools            58.1.0
skia-pathops          0.8.0.post1
soupsieve             2.4.1
srt                   3.5.3
svgelements           1.9.6
toml                  0.10.2
tomli                 2.0.1
tomlkit               0.11.0
tqdm                  4.66.4
typing_extensions     4.3.0
watchdog              4.0.1
wrapt                 1.14.1
XlsxWriter            3.0.3
LaTeX details (none)
FFMPEG

Output of ffmpeg -version:

ffmpeg version 7.0.1-full_build-www.gyan.dev Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 13.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-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libaribb24 --enable-libaribcaption --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libxevd --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxeve --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libharfbuzz --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-dxva2 --enable-d3d11va --enable-d3d12va --enable-ffnvcodec --enable-libvpl --enable-nvdec --enable-nvenc --enable-vaapi --enable-libshaderc --enable-vulkan --enable-libplacebo --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-libcodec2 --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      59.  8.100 / 59.  8.100
libavcodec     61.  3.100 / 61.  3.100
libavformat    61.  1.100 / 61.  1.100
libavdevice    61.  1.100 / 61.  1.100
libavfilter    10.  1.100 / 10.  1.100
libswscale      8.  1.100 /  8.  1.100
libswresample   5.  1.100 /  5.  1.100
libpostproc    58.  1.100 / 58.  1.100```
</details>

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions