Skip to content

Cannot open input device #197

Open
Open

Description

@willbelr

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

Activity

  1. willbelr commented on Sep 27, 2023

    @willbelr
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions