diff --git a/trezorlib/transport/webusb.py b/trezorlib/transport/webusb.py index 4b27aac..44b5daf 100644 --- a/trezorlib/transport/webusb.py +++ b/trezorlib/transport/webusb.py @@ -101,7 +101,16 @@ class WebUsbTransport(Transport): continue if not is_vendor_class(dev): continue - devices.append(WebUsbTransport(dev)) + try: + # workaround for issue #223: + # on certain combinations of Windows USB drivers and libusb versions, + # Trezor is returned twice (possibly because Windows know it as both + # a HID and a WebUSB device), and one of the returned devices is + # non-functional. + dev.getProduct() + devices.append(WebUsbTransport(dev)) + except usb1.USBErrorNotSupported: + pass return devices def find_debug(self):