manim icon indicating copy to clipboard operation
manim copied to clipboard

TypeError: 'staticmethod' object is not callable

Open Ex-monsters opened this issue 1 year ago • 14 comments

Describe the error

Once I've installed the conda environment, after installing the dependencies in the requirements, executing manimgl comes up. The installation configuration is the reference https://docs.manim.org.cn/.

Code and Error

Code: (manim) E:\manim>manimgl 48df3ebaf734a046ab09c9db0a37426 ec0e47b7da5919fb334e9812fcb18b7

Error: Traceback (most recent call last): File "E:\anaconda\envs\manim\lib\runpy.py", line 194, in _run_module_as_main return run_code(code, main_globals, None, File "E:\anaconda\envs\manim\lib\runpy.py", line 87, in run_code exec(code, run_globals) File "E:\anaconda\envs\manim\Scripts\manimgl.exe_main.py", line 4, in File "E:\manim\manimlib_init.py", line 14, in from manimlib.animation.animation import * File "E:\manim\manimlib\animation\animation.py", line 5, in from manimlib.mobject.mobject import _AnimationBuilder File "E:\manim\manimlib\mobject\mobject.py", line 64, in class Mobject(object): File "E:\manim\manimlib\mobject\mobject.py", line 230, in Mobject def set_data(self, data: np.ndarray) -> Self: TypeError: 'staticmethod' object is not callable

Environment

OS System: manim version: master python version:Python 3.8.19

Ex-monsters avatar Apr 28 '24 08:04 Ex-monsters

I meet the same problem

Felix0231 avatar May 28 '24 14:05 Felix0231

I am also having the same error.

diogodsa avatar May 30 '24 14:05 diogodsa

I am also having the same error.

LuoRongKang avatar Jun 03 '24 07:06 LuoRongKang

Same Error. Any idea now?

zykRichard avatar Jun 07 '24 05:06 zykRichard

I upgraded from Python 3.8 to 3.10! Hope that helps

Sourish07 avatar Jun 08 '24 17:06 Sourish07

I solved it by commenting out all @staticmethod line in file mobject.py and scene.py.

In your environment, they are:

"E:\manim\manimlib\mobject\mobject.py"

"E:\manim\manimlib\scene\scene.py"

So try to replace all the @staticmethod by # @staticmethod in these two files.

Loyage avatar Jun 20 '24 16:06 Loyage

i have same issue

Khurramcoder avatar Jul 28 '24 05:07 Khurramcoder

The comment above about python 3.10 helped me. This was on OSX

For noobs here is a tutorial : `run python -V and see if you have an old python version. I had 3.9.

You might need to download python3.10. I had several python versions, and for. me 3.10 vas available at python3.10 -V ->

Locate python 3.10 or higher and create a virtual environment using it.

python3.10 -m venv venv

Then , activate the venv

source venv/bin/activate

Now, you can try to use the python command again, and now the version is 3.10 `python -V (should give you 3.10 or more)

Then install run pip install -e .

Then run the example manimgl example_scenes.py OpeningManimExample

Hlaejanor avatar Aug 21 '24 10:08 Hlaejanor

Currently working python version to me is 3.10.14 (3.12 (numpy) and 3.9 (@staticmethod) both fall to my compiler)

(On M1 MacOS 15.0-beta)

zangjiucheng avatar Sep 01 '24 05:09 zangjiucheng

Working just fine (without changing anything) with python 3.11.4 on M1 Pro 2020 (macOS 15.0.1).

thebinij avatar Oct 15 '24 16:10 thebinij

updating python to 3.10 may be useful

seusrj avatar Oct 17 '24 11:10 seusrj

Change from 3.9 to 3.10 and solve. I hope this is useful.

boring180 avatar Oct 22 '24 06:10 boring180

Hey, have you already solved this error? I upgraded my Python to 3.10.0, but it still doesn't work. 😭

dumohan0302 avatar Apr 20 '25 19:04 dumohan0302

My Python version is Python 3.10.15 Followin is my pip list Package Version


asttokens 2.4.1 click 8.1.7 cloup 3.0.5 colour 0.1.5 contourpy 1.3.0 cycler 0.12.1 Cython 3.0.11 data 0.4 decorator 5.1.1 exceptiongroup 1.2.2 executing 2.1.0 fonttools 4.54.1 funcsigs 1.0.2 future 1.0.0 glcontext 3.0.0 ipython 8.29.0 isosurfaces 0.1.2 jedi 0.19.1 kiwisolver 1.4.7 latex 0.7.0 manim 0.18.1 manimgl 1.7.1 ManimPango 0.6.0 mapbox_earcut 1.0.2 markdown-it-py 3.0.0 matplotlib 3.9.2 matplotlib-inline 0.1.7 mdurl 0.1.2 moderngl 5.12.0 moderngl-window 2.4.6 mpmath 1.3.0 multipledispatch 1.0.0 networkx 3.4.2 numpy 1.26.4 packaging 24.1 parso 0.8.4 pexpect 4.9.0 pillow 11.0.0 pip 24.2 prompt_toolkit 3.0.48 ptyprocess 0.7.0 pure_eval 0.2.3 pycairo 1.27.0 pydub 0.25.1 pyglet 2.0.18 Pygments 2.18.0 pyobjc-core 10.3.1 pyobjc-framework-Cocoa 10.3.1 PyOpenGL 3.1.7 pyparsing 3.2.0 pyperclip 1.9.0 pyrr 0.10.3 python-dateutil 2.9.0.post0 PyYAML 6.0.2 rich 13.9.3 scipy 1.14.1 screeninfo 0.8.1 setuptools 75.1.0 shutilwhich 1.1.0 six 1.16.0 skia-pathops 0.8.0.post2 srt 3.5.3 stack-data 0.6.3 svgelements 1.9.6 sympy 1.13.3 tempdir 0.7.1 tqdm 4.66.6 traitlets 5.14.3 typing_extensions 4.12.2 validators 0.34.0 watchdog 5.0.3 wcwidth 0.2.13 wheel 0.44.0

Hope this helps!

boring180 avatar Apr 20 '25 19:04 boring180