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

OSError: [Errno 19] No such device (different from issue #397) #531

Closed
Chris-Calvo opened this issue Mar 12, 2022 · 1 comment
Closed

OSError: [Errno 19] No such device (different from issue #397) #531

Chris-Calvo opened this issue Mar 12, 2022 · 1 comment

Comments

@Chris-Calvo
Copy link

Chris-Calvo commented Mar 12, 2022

Hello,
I am running into an issue where if my keyboard disconnects, events on the keyboard are no longer listed to, even if the keyboard reconnects.
Here is the full traceback error:

`
Exception in thread Thread-4:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner

Exception in thread Thread-6:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
Exception in thread Thread-5:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 892, in run
self.run()
File "/usr/lib/python3.9/threading.py", line 892, in run
self.run()
File "/usr/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.9/dist-packages/keyboard/_nixcommon.py", line 106, in start_reading
self.event_queue.put(device.read_event())
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.9/dist-packages/keyboard/_nixcommon.py", line 106, in start_reading
self.event_queue.put(device.read_event())
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.9/dist-packages/keyboard/_nixcommon.py", line 106, in start_reading
self.event_queue.put(device.read_event())
File "/usr/local/lib/python3.9/dist-packages/keyboard/_nixcommon.py", line 83, in read_event
data = self.input_file.read(struct.calcsize(event_bin_format))

OSError: [Errno 19] No such device
File "/usr/local/lib/python3.9/dist-packages/keyboard/_nixcommon.py", line 83, in read_event
File "/usr/local/lib/python3.9/dist-packages/keyboard/_nixcommon.py", line 83, in read_event
data = self.input_file.read(struct.calcsize(event_bin_format))

OSError: [Errno 19] No such device
data = self.input_file.read(struct.calcsize(event_bin_format))
OSError: [Errno 19] No such device
Traceback (most recent call last):
File "/home/pi/Documents/URaspServer.py", line 149, in
elif(keyboard.is_pressed('4'))
File "/usr/local/lib/python3.9/dist-packages/keyboard/init.py", line 417, in is_pressed
steps = parse_hotkey(hotkey)
File "/usr/local/lib/python3.9/dist-packages/keyboard/init.py", line 344, in parse_hotkey
scan_codes = key_to_scan_codes(hotkey)
File "/usr/local/lib/python3.9/dist-packages/keyboard/init.py", line 317, in key_to_scan_codes
t = tuple(_collections.OrderedDict((scan_code, True) for scan_code, modifier in _os_keyboard.map_name(normalized)))
File "/usr/local/lib/python3.9/dist-packages/keyboard/init.py", line 317, in
t = tuple(_collections.OrderedDict((scan_code, True) for scan_code, modifier in _os_keyboard.map_name(normalized)))
KeyboardInterrupt
`

I know this is one of those "plz help fix for me" posts, so I apologize and I understand that there are hundreds of other issues open on your page as of now. The only issue was similar was issue I saw was #397 (Fix #436), but this appears to be happening in a different location.

@Chris-Calvo
Copy link
Author

Just realized this is THE SAME as issue #397, I just needed to step away and come back with some fresh eyes I guess

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

1 participant