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

ImportError: cannot import name 'SmallDot' from 'manim.mobject.geometry' #11

Closed
emonhossainraihan opened this issue May 28, 2021 · 1 comment

Comments

@emonhossainraihan
Copy link

Description of bug / unexpected behavior

I use the README code to render the scene but got this problem. I think chanim use older manim version. But I couldn't figure out which version will resolve this issue as there was no mention in the README file.

Expected behavior

I was expecting to generate the following scene:

How to reproduce the issue

Code for reproducing the problem
from chanim import *

class ChanimScene(Scene):
    def construct(self):
        chem = ChemWithName("*6((=O)-N(-CH_3)-*5(-N=-N(-CH_3)-=)--(=O)-N(-H_3C)-)")

        self.play(chem.creation_anim())
        self.wait()

Logs

Terminal output
Manim Community v0.6.0

Traceback (most recent call last):
  File "/home/emonhossain/.local/bin/manim", line 8, in <module>
    sys.exit(main())
  File "/home/emonhossain/.local/lib/python3.8/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/emonhossain/.local/lib/python3.8/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/emonhossain/.local/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/emonhossain/.local/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/emonhossain/.local/lib/python3.8/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/emonhossain/.local/lib/python3.8/site-packages/manim/cli/render/commands.py", line 153, in render
    for SceneClass in scene_classes_from_file(file):
  File "/home/emonhossain/.local/lib/python3.8/site-packages/manim/utils/module_ops.py", line 118, in scene_classes_from_file
    module = get_module(file_path)
  File "/home/emonhossain/.local/lib/python3.8/site-packages/manim/utils/module_ops.py", line 47, in get_module
    spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "chem.py", line 1, in <module>
    from chanim import *
  File "/home/emonhossain/Desktop/chanim/chanim/__init__.py", line 8, in <module>
    from .chem_objects import *
  File "/home/emonhossain/Desktop/chanim/chanim/chem_objects.py", line 17, in <module>
    from manim.mobject.geometry import SmallDot
ImportError: cannot import name 'SmallDot' from 'manim.mobject.geometry' (/home/emonhossain/.local/lib/python3.8/site-packages/manim/mobject/geometry.py)

System specifications

System Details
  • OS (with version, e.g Windows 10 v2004 or macOS 10.15 (Catalina)): Ubuntu 20.04
  • RAM: 8GB
  • Python version (python/py/python3 --version): 3.8.5
  • Installed modules (provide output from pip list):
Package                Version              Location
---------------------- -------------------- --------------------------------
appdirs                1.4.3
apturl                 0.5.2
argon2-cffi            20.1.0
astroid                2.5.6
async-generator        1.10
attrs                  20.3.0
backcall               0.2.0
bcrypt                 3.1.7
beautifulsoup4         4.8.2
bleach                 3.3.0
blessings              1.7
blinker                1.4
bpython                0.21
Brlapi                 0.7.0
certifi                2019.11.28
cffi                   1.14.5
chanim                 0.1.0                /home/emonhossain/Desktop/chanim
chardet                3.0.4
chrome-gnome-shell     0.0.0
click                  7.1.2
click-default-group    1.2.2
cloudpickle            1.6.0
cloup                  0.7.0
colorama               0.4.3
colour                 0.1.5
command-not-found      0.3
commonmark             0.9.1
cryptography           2.8
cupshelpers            1.0
curtsies               0.3.5
cwcwidth               0.1.4
cycler                 0.10.0
dbus-python            1.2.16
decorator              4.4.2
defer                  1.0.6
defusedxml             0.7.1
distlib                0.3.0
distro                 1.4.0
distro-info            0.23ubuntu1
duplicity              0.8.12.0
entrypoints            0.3
fasteners              0.14.1
filelock               3.0.12
future                 0.18.2
glcontext              2.3.2
gpg                    1.13.1-unknown
greenlet               1.0.0
html5lib               1.0.1
httplib2               0.14.0
idna                   2.8
imageio                2.9.0
importlib-metadata     1.5.0
ipykernel              5.5.3
ipython                7.20.0
ipython-genutils       0.2.0
ipywidgets             7.6.3
isort                  5.8.0
jedi                   0.18.0
Jinja2                 2.11.3
jsonschema             3.2.0
jupyter                1.0.0
jupyter-client         6.1.12
jupyter-console        6.4.0
jupyter-core           4.7.1
jupyterlab-pygments    0.1.2
jupyterlab-widgets     1.0.0
keyring                18.0.1
kiwisolver             1.3.1
language-selector      0.1
launchpadlib           1.10.13
lazr.restfulclient     0.14.2
lazr.uri               1.0.3
lazy-object-proxy      1.6.0
linecache2             1.0.0
lockfile               0.12.2
louis                  3.12.0
lxml                   4.5.0
macaroonbakery         1.3.1
Mako                   1.1.0
manim                  0.6.0
manim-fonts            0.1.0.post4
manim-rubikscube       0.0.8
ManimPango             0.2.4
mapbox-earcut          0.12.10
MarkupSafe             1.1.0
mathinspector          0.9.3.post0
matplotlib             3.3.4
mccabe                 0.6.1
mistune                0.8.4
moderngl               5.6.4
moderngl-window        2.3.0
monotonic              1.5
more-itertools         4.2.0
mpmath                 1.2.1
multipledispatch       0.6.0
nbclient               0.5.3
nbconvert              6.0.7
nbformat               5.1.3
nest-asyncio           1.5.1
netifaces              0.10.4
networkx               2.5
notebook               6.3.0
numpy                  1.20.1
oauthlib               3.1.0
olefile                0.46
opencv-python          4.5.1.48
packaging              20.9
pandocfilters          1.4.3
paramiko               2.6.0
parso                  0.8.1
pbr                    5.4.5
persepolis             3.2.0
pexpect                4.6.0
pickleshare            0.7.5
Pillow                 7.0.0
pip                    21.1.1
progressbar            2.5
prometheus-client      0.10.1
prompt-toolkit         3.0.16
protobuf               3.6.1
psutil                 5.5.1
ptyprocess             0.7.0
pycairo                1.20.0
pycparser              2.20
pycups                 1.9.73
pydub                  0.24.1
pygame                 2.0.1
pyglet                 1.5.15
PyGLM                  1.99.3
Pygments               2.8.0
PyGObject              3.36.0
PyJWT                  1.7.1
pylint                 2.8.2
pymacaroons            0.13.0
PyNaCl                 1.3.0
PyOpenGL               3.1.5
PyOpenGL-accelerate    3.1.5
pyparsing              2.4.7
PyQt5                  5.14.1
pyRFC3339              1.1
pyrr                   0.10.3
pyrsistent             0.17.3
PySocks                1.6.8
python-apt             2.0.0+ubuntu0.20.4.4
python-dateutil        2.7.3
python-debian          0.1.36ubuntu1
pytz                   2019.3
PyWavelets             1.1.1
pyxattr                0.6.1
pyxdg                  0.26
PyYAML                 5.3.1
pyzmq                  22.0.3
qtconsole              5.0.3
QtPy                   1.9.0
reportlab              3.5.34
requests               2.22.0
requests-unixsocket    0.2.0
rich                   6.2.0
scikit-image           0.18.1
scipy                  1.6.1
scour                  0.37
screeninfo             0.6.7
SecretStorage          2.3.1
Send2Trash             1.5.0
setproctitle           1.1.10
setuptools             53.0.0
Shapely                1.7.1
simplejson             3.16.0
sip                    4.19.21
six                    1.14.0
soupsieve              1.9.5
sympy                  1.7.1
systemd-python         234
terminado              0.9.4
testpath               0.4.4
testresources          2.0.0
tifffile               2021.3.17
toml                   0.10.2
torbrowser-launcher    0.3.2
tornado                6.1
tqdm                   4.57.0
traceback2             1.4.0
traitlets              5.0.5
ttkthemes              2.0.6
typing-extensions      3.7.4.3
ubuntu-advantage-tools 27.0
ubuntu-cleaner         1.1.3
ubuntu-drivers-common  0.0.0
ufw                    0.36
unattended-upgrades    0.1
unittest2              1.1.0
urllib3                1.25.8
usb-creator            0.3.7
validators             0.18.2
virtualenv             20.0.17
wadllib                1.3.3
watchdog               2.0.2
wcwidth                0.2.5
webencodings           0.5.1
wheel                  0.36.2
widgetsnbextension     3.5.1
wrapt                  1.12.1
xkit                   0.0.0
youtube-dl             2020.3.24
zipp                   1.0.0

Additional comments

@kilacoda-old
Copy link
Collaborator

Fixed in 2a74a7f and 698d738

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

No branches or pull requests

2 participants