3b1b / manim

Animation engine for explanatory math videos
MIT License
62.66k stars 5.81k forks source link

Error when running `manimgl start.py SquareToCircle` #2047

Open PreX-AW opened 1 year ago

PreX-AW commented 1 year ago

Describe the error

Running manimgl start.py SquareToCircle show the error . Should I change the python version? If it is , how to change it ?

Code and Error

Code:

manimgl statrt.py SquareToCircle Error:

Python 3.8.10 (default, May 26 2023, 14:05:08) 
Type 'copyright', 'credits' or 'license' for more information
IPython 8.12.2 -- An enhanced Interactive Python. Type '?' for help.
/home/ros1/.local/lib/python3.8/site-packages/IPython/terminal/embed.py:298: UserWarning: Failed to get module start
  warnings.warn("Failed to get module %s" % \

Unhandled exception in event loop:
  File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
    self._context.run(self._callback, *self._args)
  File "/home/ros1/.local/lib/python3.8/site-packages/prompt_toolkit/input/vt100.py", line 173, in callback_wrapper
    callback()
  File "/home/ros1/.local/lib/python3.8/site-packages/prompt_toolkit/application/application.py", line 698, in read_from_input
    self.key_processor.process_keys()
  File "/home/ros1/.local/lib/python3.8/site-packages/prompt_toolkit/key_binding/key_processor.py", line 272, in process_keys
    self._process_coroutine.send(key_press)
  File "/home/ros1/.local/lib/python3.8/site-packages/prompt_toolkit/key_binding/key_processor.py", line 170, in _process
    matches = self._get_matches(buffer)
  File "/home/ros1/.local/lib/python3.8/site-packages/prompt_toolkit/key_binding/key_processor.py", line 128, in _get_matches
    return [b for b in self._bindings.get_bindings_for_keys(keys) if b.filter()]
  File "/home/ros1/.local/lib/python3.8/site-packages/prompt_toolkit/key_binding/key_processor.py", line 128, in <listcomp>
    return [b for b in self._bindings.get_bindings_for_keys(keys) if b.filter()]
  File "/home/ros1/.local/lib/python3.8/site-packages/prompt_toolkit/filters/base.py", line 134, in __call__
    return all(f() for f in self.filters)
  File "/home/ros1/.local/lib/python3.8/site-packages/prompt_toolkit/filters/base.py", line 134, in <genexpr>
    return all(f() for f in self.filters)
  File "/home/ros1/.local/lib/python3.8/site-packages/prompt_toolkit/filters/base.py", line 248, in __call__
    return self.func()
  File "/home/ros1/.local/lib/python3.8/site-packages/IPython/terminal/shortcuts/filters.py", line 83, in auto_match
    return shell.auto_match

Exception 'NoneType' object has no attribute 'auto_match'
Press ENTER to continue...                                                       
In [1]: touch

Environment

OS System: Ubuntu 20.04.06 manim version: master ManimGL v1.6.1 python version:3.8.10

End-Poem commented 1 year ago

I had a same error...

mathematics128 commented 1 year ago

Did you install manimgl directly by pip install manimgl? I dont have a same problem, but when I enter the interactive command line, I cannot type a "(" as it will raise the same error as yours. The problem solved after I reinstall from the master branch.

mikolajlubiak commented 1 year ago

This issue seems to not be related to manim, but IPython. For some reason the shell in return shell.auto_match in the file IPython/terminal/shortcuts/filters.py is a NoneType, which I assume is a bug in IPython, try reporting this to IPython instead.

PreX-AW commented 1 year ago

Thank you for your suggestion, I'll try it later .> Did you install manimgl directly by pip install manimgl? I dont have a same problem, but when I enter the interactive command line, I cannot type a "(" as it will raise the same error as yours. The problem solved after I reinstall from the master branch.

PreX-AW commented 1 year ago

Did you install manimgl directly by pip install manimgl? I dont have a same problem, but when I enter the interactive command line, I cannot type a "(" as it will raise the same error as yours. The problem solved after I reinstall from the master branch.

I tried the method you mentioned, but it's not work for me. Thank you.

PreX-AW commented 1 year ago

This issue seems to not be related to manim, but IPython. For some reason the shell in return shell.auto_match in the file IPython/terminal/shortcuts/filters.py is a NoneType, which I assume is a bug in IPython, try reporting this to IPython instead.

So could you tell me if there are any solutions now? I tried some methods, but none of them worked.