C0rn3j / sc-controller

User-mode driver and GTK3 based GUI for Steam Controller
GNU General Public License v2.0
15 stars 1 forks source link

Connecting a steam controller causes FileNotFoundErrors #40

Open git-developer opened 5 days ago

git-developer commented 5 days ago

These messages were shown when I connected a steam controller via USB:

E evdev         [Errno 2] No such file or directory: '/dev/input/event24'
Traceback (most recent call last):
  File "/tmp/.mount_sc-conk3I8dd/usr/lib/python3/dist-packages/evdev/device.py", line 126, in __init__
    fd = os.open(dev, os.O_RDWR | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/input/event24'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/.mount_sc-conk3I8dd/usr/lib/python3.10/site-packages/scc/drivers/evdevdrv.py", line 398, in handle_new_device
    dev = evdev.InputDevice(eventnode)
  File "/tmp/.mount_sc-conk3I8dd/usr/lib/python3/dist-packages/evdev/device.py", line 128, in __init__
    fd = os.open(dev, os.O_RDONLY | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/input/event24'
E evdev         [Errno 2] No such file or directory: '/dev/input/event23'
Traceback (most recent call last):
  File "/tmp/.mount_sc-conk3I8dd/usr/lib/python3/dist-packages/evdev/device.py", line 126, in __init__
    fd = os.open(dev, os.O_RDWR | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/input/event23'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/.mount_sc-conk3I8dd/usr/lib/python3.10/site-packages/scc/drivers/evdevdrv.py", line 398, in handle_new_device
    dev = evdev.InputDevice(eventnode)
  File "/tmp/.mount_sc-conk3I8dd/usr/lib/python3/dist-packages/evdev/device.py", line 128, in __init__
    fd = os.open(dev, os.O_RDONLY | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/input/event23'
E evdev         [Errno 2] No such file or directory: '/dev/input/event22'
Traceback (most recent call last):
  File "/tmp/.mount_sc-conk3I8dd/usr/lib/python3/dist-packages/evdev/device.py", line 126, in __init__
    fd = os.open(dev, os.O_RDWR | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/input/event22'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/.mount_sc-conk3I8dd/usr/lib/python3.10/site-packages/scc/drivers/evdevdrv.py", line 398, in handle_new_device
    dev = evdev.InputDevice(eventnode)
  File "/tmp/.mount_sc-conk3I8dd/usr/lib/python3/dist-packages/evdev/device.py", line 128, in __init__
    fd = os.open(dev, os.O_RDONLY | os.O_NONBLOCK)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/input/event22'

Environment: sc-controller-v0.4.9.4-jammy-x86_64.AppImage

I went to /dev/input/ after seeing these message. The OS is right: the files /dev/input/event2[234] do not exist. The last devices are:

/dev/input/event19:     SCController Keyboard
/dev/input/event20:     SCController Mouse
/dev/input/event21:     Microsoft X-Box 360 pad
C0rn3j commented 4 days ago

iirc it's some event123_whatever files which we shouldn't be matching but there's a dumb wildcard instead of a regex for event[0-9]*(or however you write that in regex) so those files with an underscore are matched too.