joycond-cemuhook
joycond-cemuhook copied to clipboard
Error whilst trying to connect joycons.
When my Joycons are connected to my laptop and I try to start using "python3 joycond-cemuhook.py" this message always appears:
Looking for Nintendo Switch controllers...
Traceback (most recent call last):
File "joycond-cemuhook.py", line 54, in get_player_id
leds = device.items()
AttributeError: 'InputDevice' object has no attribute 'items'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "joycond-cemuhook.py", line 769, in <module>
main()
File "joycond-cemuhook.py", line 766, in main
handle_devices(stop_event)
File "joycond-cemuhook.py", line 641, in handle_devices
players[get_player_id(d)].append(d)
File "joycond-cemuhook.py", line 56, in get_player_id
leds = get_led_status(device).items()
File "joycond-cemuhook.py", line 36, in get_led_status
udev_device = context.list_devices(subsystem='input').match_attribute('uniq', device.uniq.encode()).match_attribute('name', device.name.encode())
AttributeError: 'InputDevice' object has no attribute 'uniq'
I tried re-installing and restarting my laptop multiple times but nothing has worked. I am not very experienced when it comes to programming, so looking at this error it basically makes no sense to me. Any idea of what is happening?
*Edit: Using Elementary OS 5.1.7 Hera, Linux 5.4.0-65-generic, GTK 3.22.30
Looks like the evdev module installed is too old or broken.
You can find your evdev version by running python -m pip list | grep evdev
(current version is 1.4.0).
Try to update to the latest version using python -m pip install --upgrade evdev
, or reinstalling it by running
python -m pip uninstall evdev && python -m pip install evdev
.