Closed zhuyu4839 closed 8 months ago
Can confirm that this occurs not only with hubs, but with USB devices too.
Exception in thread Thread-2:
Traceback (most recent call last):
File "~/.environment/lib/python3.11/threading.py", line 1045, in _bootstrap_inner
self.run()
File "~/.environment/lib/python3.11/site-packages/pyudev/monitor.py", line 544, in run
self._callback(device)
File "~/.environment/lib/python3.11/site-packages/usbmonitor/__platform_specific_detectors/_linux_usb_detector.py", line 76, in __handle_device_event
device_info = self.last_check_devices[device_id].copy()
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: '/dev/bus/usb/001/109'
This error breaks the monitoring deamon. No further connect or disconnect is detected past this point.
Thanks to @francisjeanneau for finding and solving the issue!
Error when USB-HUB remove:
usbmonitor/__platform_specific_detectors/_linux_usb_detector.py", line 76, in __handle_device_event device_info = self.last_check_devices[device_id].copy()