Errors connecting to ODrive

Trying to connect to the ODrive board using odrivetool but getting “Task exception was never retrieved”. See full error message below.

Task exception was never retrieved
future: <Task finished name=‘Task-3’ coro=<_Domain.run_discovery..loop() done, defined at C:\Users\LisaLi\AppData\Local\Programs\Python\Python38\Lib\site-packages\odrive\pyfibre\fibre\libfibre.py:974> exception=error(6, ‘GetConsoleScreenBufferInfo’, ‘The handle is invalid.’)>
Traceback (most recent call last):
File “C:\Users\LisaLi\AppData\Local\Programs\Python\Python38\Lib\site-packages\odrive\pyfibre\fibre\libfibre.py”, line 977, in loop
await callback(obj)
File “C:\Users\LisaLi\AppData\Local\Programs\Python\Python38\Lib\site-packages\odrive\pyfibre\fibre\shell.py”, line 41, in discovered_device
logger.notify(“{} to {} as {}”.format(verb, display_name, var_name))
File “C:\Users\LisaLi\AppData\Local\Programs\Python\Python38\Lib\site-packages\odrive\pyfibre\fibre\utils.py”, line 128, in notify
self.print_colored(self._prefix + text, Logger.COLOR_CYAN)
File “C:\Users\LisaLi\AppData\Local\Programs\Python\Python38\Lib\site-packages\odrive\pyfibre\fibre\utils.py”, line 112, in print_colored
self.print_on_second_last_line(text, color)
File “C:\Users\LisaLi\AppData\Local\Programs\Python\Python38\Lib\site-packages\odrive\pyfibre\fibre\utils.py”, line 78, in print_on_second_last_line
info = self._stdout_buf.GetConsoleScreenBufferInfo()
pywintypes.error: (6, ‘GetConsoleScreenBufferInfo’, ‘The handle is invalid.’)

I’m able to update the firmware on the board using odrivetool dfu since I’ve read some other forum posts suggesting that a firmware update might be necessary. However this did not solve the issue.

Maybe try updating odrivetool? We just pushed an update today. pip install --upgrade odrive - should report 0.6.2.post0

ODrive control utility v0.6.2.post0
Website: https://odriverobotics.com/
Docs: https://docs.odriverobotics.com/
Forums: https://discourse.odriverobotics.com/
Discord: ODrive
Github: https://github.com/odriverobotics/ODrive/
Please connect your ODrive.
You can also type help() or quit().
In [1]: Task exception was never retrieved
future: <Task finished name=‘Task-3’ coro=<_Domain.run_discovery..loop() done, defined at C:\Users\LisaLi\AppData\Local\Programs\Python\Python38\Lib\site-packages\odrive\pyfibre\fibre\libfibre.py:974> exception=error(6, ‘GetConsoleScreenBufferInfo’, ‘The handle is invalid.’)>
Traceback (most recent call last):
File “C:\Users\LisaLi\AppData\Local\Programs\Python\Python38\Lib\site-packages\odrive\pyfibre\fibre\libfibre.py”, line 977, in loop
await callback(obj)
File “C:\Users\LisaLi\AppData\Local\Programs\Python\Python38\Lib\site-packages\odrive\pyfibre\fibre\shell.py”, line 41, in discovered_device
logger.notify(“{} to {} as {}”.format(verb, display_name, var_name))
File “C:\Users\LisaLi\AppData\Local\Programs\Python\Python38\Lib\site-packages\odrive\pyfibre\fibre\utils.py”, line 128, in notify
self.print_colored(self._prefix + text, Logger.COLOR_CYAN)
File “C:\Users\LisaLi\AppData\Local\Programs\Python\Python38\Lib\site-packages\odrive\pyfibre\fibre\utils.py”, line 112, in print_colored
self.print_on_second_last_line(text, color)
File “C:\Users\LisaLi\AppData\Local\Programs\Python\Python38\Lib\site-packages\odrive\pyfibre\fibre\utils.py”, line 78, in print_on_second_last_line
info = self._stdout_buf.GetConsoleScreenBufferInfo()
pywintypes.error: (6, ‘GetConsoleScreenBufferInfo’, ‘The handle is invalid.’)

I am receiving the same error. I’ve tried this on a different laptop as well and I’m getting the same error.

I’ve fixed the issue with using WinUSB driver for Native Interface and using Windows cmd line instead of bash

1 Like