Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninitialized bitbox2 causes enumerate to fail #434

Open
instagibbs opened this issue Feb 1, 2021 · 4 comments
Open

Uninitialized bitbox2 causes enumerate to fail #434

instagibbs opened this issue Feb 1, 2021 · 4 comments
Labels

Comments

@instagibbs
Copy link
Collaborator

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
@instagibbs
Copy link
Collaborator Author

@benma can you take a look?

@benma
Copy link
Contributor

benma commented Feb 1, 2021

@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.

@instagibbs
Copy link
Collaborator Author

instagibbs commented Feb 2, 2021

Ah you're right. Unsure if that's the proper behavior(throwing an inscrutable error), so leaving this issue open for ideas.

@benma
Copy link
Contributor

benma commented Feb 2, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants