hid.Device().serial is broken
mayanksuman opened this issue · 5 comments
mayanksuman commented
After opening the device as
h = hid.Device(vid, pid)
The h.serial
produces following error trace:
h.serial
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "~/.local/lib/python3.7/site-packages/hid/__init__.py", line 200, in serial
return self.__readstring(hidapi.hid_get_serial_number_string)
File "~/.local/lib/python3.7/site-packages/hid/__init__.py", line 145, in __readstring
self.__hidcall(function, self.__dev, buf, max_length)
File "~/.local/lib/python3.7/site-packages/hid/__init__.py", line 136, in __hidcall
ret = function(*args, **kwargs)
TypeError: __init__ expected at most 1 arguments, got 3
Properties like h.manufacturer
and h.product
works.
apmorton commented
Can you confirm this is fixed by installing from git master?
I will push to pypi if the latest changes resolve this issue.
mayanksuman commented
Yes. It is fixed in git master.
mdkcore0 commented
pypi version is on 1.0.3, so this problem still occuring
apmorton commented
apologies this slipped through the cracks - I have published 1.0.4 to pypi
mdkcore0 commented
no problem, got the update rehe, thanks!