You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The odrivetool shell doesn't work with ipython 8.11. You get all sorts of various exceptions if you hit enter, tab, type anything etc.
Some examples:
Unhandled exception in event loop:
File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/home/che/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/prompt_toolkit/application/application.py", line 698, in read_from_input
self.key_processor.process_keys()
File "/home/che/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/prompt_toolkit/key_binding/key_processor.py", line 272, in process_keys
self._process_coroutine.send(key_press)
File "/home/che/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/prompt_toolkit/key_binding/key_processor.py", line 187, in _process
self._call_handler(matches[-1], key_sequence=buffer[:])
File "/home/che/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/prompt_toolkit/key_binding/key_processor.py", line 322, in _call_handler
handler.call(event)
File "/home/che/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/prompt_toolkit/key_binding/key_bindings.py", line 126, in call
result = self.handler(event)
File "/home/che/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/IPython/terminal/shortcuts/__init__.py", line 374, in handle_return_or_newline_or_execute
return newline_or_execute_outer(shell)(event)
File "/home/che/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/IPython/terminal/shortcuts/__init__.py", line 397, in newline_or_execute
status, indent = shell.check_complete(check_text)
Exception 'NoneType' object has no attribute 'check_complete'
Unhandled exception in event loop:
File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/home/che/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/prompt_toolkit/application/application.py", line 698, in read_from_input
self.key_processor.process_keys()
File "/home/che/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/prompt_toolkit/key_binding/key_processor.py", line 272, in process_keys
self._process_coroutine.send(key_press)
File "/home/che/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/prompt_toolkit/key_binding/key_processor.py", line 170, in _process
matches = self._get_matches(buffer)
File "/home/che/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/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/che/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/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/che/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/prompt_toolkit/filters/base.py", line 134, in __call__
return all(f() for f in self.filters)
File "/home/che/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/prompt_toolkit/filters/base.py", line 134, in <genexpr>
return all(f() for f in self.filters)
File "/home/che/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/prompt_toolkit/filters/base.py", line 248, in __call__
return self.func()
File "/home/che/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/IPython/terminal/shortcuts/filters.py", line 75, in auto_match
return shell.auto_match
Exception 'NoneType' object has no attribute 'auto_match'
Unhandled exception in event loop:
File "/usr/lib/python3.10/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/root/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/prompt_toolkit/application/application.py", line 698, in read_from_input
self.key_processor.process_keys()
File "/root/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/prompt_toolkit/key_binding/key_processor.py", line 272, in process_keys
self._process_coroutine.send(key_press)
File "/root/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/prompt_toolkit/key_binding/key_processor.py", line 170, in _process
matches = self._get_matches(buffer)
File "/root/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/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 "/root/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/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 "/root/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/prompt_toolkit/filters/base.py", line 134, in __call__
return all(f() for f in self.filters)
File "/root/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/prompt_toolkit/filters/base.py", line 134, in <genexpr>
return all(f() for f in self.filters)
File "/root/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/prompt_toolkit/filters/base.py", line 248, in __call__
return self.func()
File "/root/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/IPython/terminal/shortcuts/filters.py", line 64, in ebivim
return shell.emacs_bindings_in_vi_insert_mode
Exception 'NoneType' object has no attribute 'emacs_bindings_in_vi_insert_mode'
Unhandled exception in event loop:
File "/root/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/prompt_toolkit/application/application.py", line 985, in in_term
await _do_wait_for_enter("Press ENTER to continue...")
File "/root/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/prompt_toolkit/application/application.py", line 1451, in _do_wait_for_enter
await session.app.run_async()
File "/root/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/prompt_toolkit/application/application.py", line 875, in run_async
return await _run_async(f)
File "/root/.cache/pypoetry/virtualenvs/odrive-play-Jdveoc2Y-py3.10/lib/python3.10/site-packages/prompt_toolkit/application/application.py", line 740, in _run_async
result = await f
Exception
Press ENTER to continue...
To Reproduce
Use odrivetool with ipython 8.11. I had set up a poetry virtual environment with the following in the pyproject.toml file:
Expected behavior
You should be able to use odrivetool like a command interpreter and issue commands like the ones in the getting started guide
Desktop
OS: Ubuntu 22.04.2 LTS
odrivetool Version: ODrive control utility v0.6.5
ipython 8.11
Additional context & workaround
It was a bit confusing for me at first as this was my first foray into using odrivetool and playing with an odrive, but eventually I came across this bug: ipython/ipython#13966
It's not clear to me if there should be a change made to the odrivetool code or if it's a upstream regression that should/will get fixed, but since I'm just interested in playing with the motor I simply added ipython = "8.10.0" to my virtual environment dependencies and rebuilt it, and then odrivetool was happy and I am also happy with a spinning motor. Hopefully this helps someone else.
The text was updated successfully, but these errors were encountered:
Describe the bug
The odrivetool shell doesn't work with ipython 8.11. You get all sorts of various exceptions if you hit enter, tab, type anything etc.
Some examples:
To Reproduce
Use odrivetool with ipython 8.11. I had set up a poetry virtual environment with the following in the pyproject.toml file:
Expected behavior
You should be able to use odrivetool like a command interpreter and issue commands like the ones in the getting started guide
Desktop
Additional context & workaround
It was a bit confusing for me at first as this was my first foray into using odrivetool and playing with an odrive, but eventually I came across this bug: ipython/ipython#13966
It's not clear to me if there should be a change made to the odrivetool code or if it's a upstream regression that should/will get fixed, but since I'm just interested in playing with the motor I simply added
ipython = "8.10.0"
to my virtual environment dependencies and rebuilt it, and then odrivetool was happy and I am also happy with a spinning motor. Hopefully this helps someone else.The text was updated successfully, but these errors were encountered: