Cannot open input device
willbelr opened this issue · 1 comments
willbelr commented
Since updating evdev package, it can no longer open a device; here a 8BitDo SF30 Pro bluetooth controller.
This could be similar to issue #134.
Arch Linux 6.1.53-1-lts
python-evdev 1.6.1-2
import evdev
dev = evdev.InputDevice("/dev/input/js0")
Traceback (most recent call last):
File "/home/user/test.py", line 3, in <module>
dev = evdev.InputDevice("/dev/input/js0")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/evdev/device.py", line 133, in __init__
info_res = _input.ioctl_devinfo(self.fd)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 22] Invalid argument
where self.fd == 3
willbelr commented
It could be a hardware issue, because it worked on another machine. I solved the problem by using /dev/input/event* instead of /dev/input/js*