diff --git a/hid/__init__.py b/hid/__init__.py index 752ddf5..69d82eb 100644 --- a/hid/__init__.py +++ b/hid/__init__.py @@ -174,7 +174,8 @@ def __init__(self, vid=None, pid=None, serial=None, path=None): raise ValueError('specify vid/pid or path') if not self.__dev: - raise HIDException('unable to open device') + err = hidapi.hid_error(0) + raise HIDException('unable to open device: ' + err) def __enter__(self): return self