zocker-160 / keyboard-center

Application for mapping macro keys on Logitech keyboards
GNU General Public License v3.0
65 stars 2 forks source link

Arch update broke the 'uinput' #42

Closed lesu1 closed 1 year ago

lesu1 commented 1 year ago

Hi, Not sure what did break the system (new Python update?), but I have some logs to share. I hope they will be helpful to understand.

System:

05.05.2023 05:52 systemd Started Keyboard Center. 05.05.2023 05:52 plasmashell Traceback (most recent call last): 05.05.2023 05:52 plasmashell File "/usr/lib/keyboard-center/main.py", line 8, in 05.05.2023 05:52 plasmashell from mainUi import MainWindow 05.05.2023 05:52 plasmashell File "/usr/lib/keyboard-center/mainUi.py", line 23, in 05.05.2023 05:52 plasmashell from devices.keyboard import SUPPORTED_DEVICES, KeyboardInterface 05.05.2023 05:52 plasmashell File "/usr/lib/keyboard-center/devices/keyboard.py", line 1, in 05.05.2023 05:52 plasmashell import uinput 05.05.2023 05:52 plasmashell ModuleNotFoundError: No module named 'uinput'

So I see that 'uinput' module is not found. I've tried to install it via: pip install python-uinput

And here's the log after that: 05.05.2023 05:55 systemd Started Keyboard Center. 05.05.2023 05:55 plasmashell Traceback (most recent call last): 05.05.2023 05:55 plasmashell File "/usr/lib/keyboard-center/main.py", line 8, in 05.05.2023 05:55 plasmashell from mainUi import MainWindow 05.05.2023 05:55 plasmashell File "/usr/lib/keyboard-center/mainUi.py", line 23, in 05.05.2023 05:55 plasmashell from devices.keyboard import SUPPORTED_DEVICES, KeyboardInterface 05.05.2023 05:55 plasmashell File "/usr/lib/keyboard-center/devices/keyboard.py", line 1, in 05.05.2023 05:55 plasmashell import uinput 05.05.2023 05:55 plasmashell File "/home/jk/.local/lib/python3.11/site-packages/uinput/init.py", line 86, in 05.05.2023 05:55 plasmashell _libsuinput_path = os.path.abspath(os.path.join(os.path.dirname(file), "..", "_libsuinput" + sysconfig.get_config_var("SO"))) 05.05.2023 05:55 plasmashell ~~~~^~~~~~~~~~ 05.05.2023 05:55 plasmashell TypeError: can only concatenate str (not "NoneType") to str

At this stage, my *nix knowledge is over. Let me know if I can help somehow. But for now, it's a great time for a timemachine. :-)

Thanks, lesu1

lesu1 commented 1 year ago

A few cents more, after a timeshift restore, I have a Python 3.10.10 version, all good. I will hold on to the Python update for now. lesu1

Aditeya commented 1 year ago

I'm experiencing the same with Python 3.11.3

zocker-160 commented 1 year ago

thanks for reporting but it is a known issue with Python 3.11, see https://github.com/tuomasjjrasanen/python-uinput/pull/41

I need to check what I can do about it, since that module I (sadly) heavily rely on is dead. A short term solution would be to create a patch, long term I will have to move away from that dependency.

(I sadly won't have time to work on a solution of this until next week, sorry :( )

lesu1 commented 1 year ago

Interesting, today everything is working fine. I've booted my machine and wow. The Keyboard Center is working fine. Still the same Python 3.11.3 in my system. @Aditeya how about you?

lesu1

Aditeya commented 1 year ago

I got an update for python-uinput from the aur pkg. Looks like they patched it, so it works!

zocker-160 commented 1 year ago

AUR maintainer of python-uinput finally got active and added the patch containing the PR needed to add support for Python 3.11.