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

horiba-ihr320: shutdown(restart=True) fails #8

Open
ddkohler opened this issue Aug 19, 2022 · 1 comment
Open

horiba-ihr320: shutdown(restart=True) fails #8

ddkohler opened this issue Aug 19, 2022 · 1 comment

Comments

@ddkohler
Copy link

Console log from restart

Task was destroyed but it is pending!
task: <Task pending name='Task-1767' coro=<IsDaemon.save_state() done, defined at C:\Users\Wright\source\yaq-python\yaqd-core\yaqd_core\_is_daemon.py:344> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x0000020D356B4F10>()]>>
Task was destroyed but it is pending!
task: <Task pending name='Task-1768' coro=<HoribaIHR320.update_state() done, defined at C:\Users\Wright\miniconda3\lib\site-packages\yaqd_horiba\_horiba_ihr.py:125> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x0000020D356B4250>()]>>
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x0000020D34E87940>
Traceback (most recent call last):
  File "C:\Users\Wright\miniconda3\lib\asyncio\proactor_events.py", line 116, in __del__
  File "C:\Users\Wright\miniconda3\lib\asyncio\proactor_events.py", line 108, in close
  File "C:\Users\Wright\miniconda3\lib\asyncio\base_events.py", line 746, in call_soon
  File "C:\Users\Wright\miniconda3\lib\asyncio\base_events.py", line 510, in _check_closed
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x0000020D34E87940>
Traceback (most recent call last):
  File "C:\Users\Wright\miniconda3\lib\asyncio\proactor_events.py", line 116, in __del__
  File "C:\Users\Wright\miniconda3\lib\asyncio\proactor_events.py", line 108, in close
  File "C:\Users\Wright\miniconda3\lib\asyncio\base_events.py", line 746, in call_soon
  File "C:\Users\Wright\miniconda3\lib\asyncio\base_events.py", line 510, in _check_closed
RuntimeError: Event loop is closed

If we get this behavior to work, I think it will provide options for recovering the usb connection in cases of intermittent comm issues.

@ksunden
Copy link
Member

ksunden commented Aug 19, 2022

Probably just needs a close function which does del self._dev explicitly.

It may also be true that calling self._dev.reset() may just transparently fix it, though not sure if it would need to be homed at that point or not.

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