You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am getting an AttributeError: 'Listener' object has no attribute '_handle'. Did you mean: '_handler'? when running tools/keyboard-test.py.
It looks to be throwing here: File "pynput/_util/xorg.py", line 473, in _handler
self._handle(self._display_stop, event, injected)
Platform and pynput version
I am running Ubuntu 24.04.2 LTS (x11) with pynput 1.8.0 using python 3.11.6 along with 3.13.0rc2.
To Reproduce
Copied and pasted keyboard-test.py into a file and ran it locally.
I took a peek at the history of the file, and noticed that this commit renamed _handle and this commit added it back in. I didn't dive in too deep, but commenting out 472 does appear to fix the issue.
As a note, uv add pynput==1.7.8 also fixes the issue for me on 3.11.6 and 3.13.0rc2.
The text was updated successfully, but these errors were encountered:
ryankanno
changed the title
Error when running
Error when running keyboard-test.py on 1.8.0
Mar 8, 2025
Description
I am getting an
AttributeError: 'Listener' object has no attribute '_handle'. Did you mean: '_handler'?
when running tools/keyboard-test.py.It looks to be throwing here: File "pynput/_util/xorg.py", line 473, in _handler
self._handle(self._display_stop, event, injected)
Platform and pynput version
I am running Ubuntu 24.04.2 LTS (x11) with pynput 1.8.0 using python 3.11.6 along with 3.13.0rc2.
To Reproduce
Copied and pasted keyboard-test.py into a file and ran it locally.
I took a peek at the history of the file, and noticed that this commit renamed _handle and this commit added it back in. I didn't dive in too deep, but commenting out 472 does appear to fix the issue.
As a note,
uv add pynput==1.7.8
also fixes the issue for me on 3.11.6 and 3.13.0rc2.The text was updated successfully, but these errors were encountered: