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

Cannot open input device #197

Open
willbelr opened this issue Sep 22, 2023 · 1 comment
Open

Cannot open input device #197

willbelr opened this issue Sep 22, 2023 · 1 comment

Comments

@willbelr
Copy link

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
Copy link
Author

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*

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