tuomasjjrasanen/python-uinput

Can't import uinput because name 'ABS_MAX' is not defined

caffVic opened this issue · 4 comments

I'm sure I must be doing something wrong. I'm attempting to run the examples and I get this error:

Traceback (most recent call last):
File "mouse.py", line 3, in
import uinput
File "/usr/lib/python2.7/site-packages/uinput/init.py", line 42, in
_ABS_CNT = ABS_MAX[1] + 1
NameError: name 'ABS_MAX' is not defined

I'm on Arch and I've tried python3 and 2

Sorry for the repeat, I got beaten to it while still thinking about how to write it :P

I have the same issue. How did you resolve it?

Using Fedora 26 with latest patches and have this problem with the shipped uinput package. The reason is because the file /usr/lib64/python2.7/site-packages/uinput/ev.py is empty. If you copy the file from the source, it will work.

if you have /usr/include/linux/input-event-codes.h
replace /usr/include/linux/input.h in setup.py to /usr/include/linux/input-event-codes.h