Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python < 3.10 - TypeError: 'staticmethod' object is not callable #2263

Open
jeertmans opened this issue Dec 10, 2024 · 2 comments
Open

Python < 3.10 - TypeError: 'staticmethod' object is not callable #2263

jeertmans opened this issue Dec 10, 2024 · 2 comments
Labels

Comments

@jeertmans
Copy link

Describe the bug

It looks like ManimGL is no longer compatible with Python < 3.10, as, prior to this Python version, @staticmethod were not regular callable (hence, using them as a wrapper didn't work).

See here https://stackoverflow.com/a/76237739.

Code:

from manimlib import *

Wrong display or Error traceback:

manim_slides/slide/manimlib.py:4: in <module>
    from manimlib import Scene, ThreeDCamera
.venv/lib/python3.9/site-packages/manimlib/__init__.py:12: in <module>
    from manimlib.window import *
.venv/lib/python3.9/site-packages/manimlib/window.py:20: in <module>
    class Window(PygletWindow):
.venv/lib/python3.9/site-packages/manimlib/window.py:117: in Window
    def on_mouse_motion(self, x: int, y: int, dx: int, dy: int) -> None:
E   TypeError: 'staticmethod' object is not callable

Additional context

See:

Static methods (@staticmethod) and class methods (@classmethod) now inherit the method attributes (module, name, qualname, doc, annotations) and have a new wrapped attribute. Moreover, static methods are now callable as regular functions. (Contributed by Victor Stinner in bpo-43682.)

from https://docs.python.org/3/whatsnew/3.10.html

@jeertmans jeertmans added the bug label Dec 10, 2024
@quyc666
Copy link

quyc666 commented Dec 25, 2024

I encountered the same problem, Python version is 3.9

@Crazy-lxy
Copy link

I encountered the same problem, Python version is 3.9.5
屏幕截图 2024-12-28 103712

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants