WampyCakes/manim-rubikscube

Square is not an attribute of manim.mobject.geometry anymore.

Closed this issue · 1 comments

Whilst performing a clean install of the latest versions of manim-rubikscube (v0.1.0) and manim (v0.15.2) in a new python environment, manim-rubikscube wouldn't even execute returning this error message:

Traceback (most recent call last):
  File "/home/grongo/manim/bin/manim-rubikscube", line 5, in <module>
    from manim_rubikscube.__main__ import main
  File "/home/grongo/manim/lib/python3.10/site-packages/manim_rubikscube/__init__.py", line 1, in <module>
    from .cube import *
  File "/home/grongo/manim/lib/python3.10/site-packages/manim_rubikscube/cube.py", line 5, in <module>
    from .cubie import Cubie
  File "/home/grongo/manim/lib/python3.10/site-packages/manim_rubikscube/cubie.py", line 5, in <module>
    from manim.mobject.geometry import Square
ImportError: cannot import name 'Square' from 'manim.mobject.geometry' (/home/grongo/manim/lib/python3.10/site-packages/manim/mobject/geometry/__init__.py)

Therefore, I checked out the documentation for the Square attribute, revealing that it is no longer in manim.mobject.geometry but is now in manim.mobject.geometry.polygram.

This issue is fixed by replacing in the cubie.py file manim.mobject.geometry with manim.mobject.geometry.polygram.

Here is the pull request for the proposed solution - #10