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
The variable prop is bytes type, but this code is trying to split it using string type, such as prop.split('"')[1] at line 132.
This always raise TypeError, so evpath is always None type when prop.startswith(b'Device Node') is true.
I believe it is a miss point when supporting Python 3.x (related issue #3373 and pr #3417).
Expected behavior prop.split(b'"')[1]
To Reproduce
I regret to say that I can't reproduce this error because I found this bug through my type checker.
Nevertheless, I report this issue because I think it is the miss point when changing string to bytes.
If this is not indeed a bug, I apologize for any inconvenience caused.
Software Versions
Describe the bug
I found a potential unexpected behavior due to a TypeError between str and bytes in
query_xinput
function.kivy/kivy/input/providers/probesysfs.py
Lines 116 to 136 in c0d4894
The variable
prop
is bytes type, but this code is trying to split it using string type, such asprop.split('"')[1]
at line 132.This always raise TypeError, so
evpath
is always None type whenprop.startswith(b'Device Node')
is true.I believe it is a miss point when supporting Python 3.x (related issue #3373 and pr #3417).
Expected behavior
prop.split(b'"')[1]
To Reproduce
I regret to say that I can't reproduce this error because I found this bug through my type checker.
Nevertheless, I report this issue because I think it is the miss point when changing string to bytes.
If this is not indeed a bug, I apologize for any inconvenience caused.
Thank you.
Code and Logs and screenshots
kivy/kivy/input/providers/probesysfs.py
Lines 116 to 136 in c0d4894
The text was updated successfully, but these errors were encountered: