HWI
HWI copied to clipboard
Uninitialized bitbox2 causes enumerate to fail
Trying to setup
the device.
client = Bitbox02Client(path)
File "/Users/.../HWI/hwi_env/lib/python3.9/site-packages/hwilib/devices/bitbox02.py", line 235, in __init__
hid_device.open_path(path.encode())
File "hid.pyx", line 74, in hid.device.open_path
OSError: open failed
@benma can you take a look?
@instagibbs "open failed" usually indicates that the device is already occupied with another app. Maybe you have another app running already, e.g. the BitBoxApp. another instance of hwi (or hwi-qt), Electrum, etc.?
I tested `hwi.py enumerate' and it seems to work as expected.
Ah you're right. Unsure if that's the proper behavior(throwing an inscrutable error), so leaving this issue open for ideas.
The error is raused by thie hidapi lib when attempting to open device. I guess we should wrap and re-raise the exception with a better message in the bitbox02 library.