spesmilo / electrum

Electrum Bitcoin Wallet
https://electrum.org
MIT License
7.33k stars 3.05k forks source link

Ledger signing - ValueError: not enough values to unpack (expected 3, got 2) #8421

Closed qherring closed 1 year ago

qherring commented 1 year ago

I have electrum v4.4.2 installed on ubuntu. I am getting the following message when trying to sign a transaction after running electrum -v:

804.88 | I | plugin.DeviceMgr | getting client for keystore 804.88 | I | plugin.DeviceMgr | end client for keystore 804.90 | I | plugin.DeviceMgr | getting client for keystore 804.90 | I | plugin.DeviceMgr | end client for keystore 822.74 | E | plugins.ledger.ledger | Error while signing Traceback (most recent call last): File "/home/username/.local/lib/python3.10/site-packages/electrum/plugins/ledger/ledger.py", line 1238, in sign_transaction for idx, pubkey, sig in input_sigs: ValueError: not enough values to unpack (expected 3, got 2)

This comes after I am prompted to review and confirm the output and fee on my ledger device.

I have everything related to ledger/electrum installed properly. (udev rules, the appropriate packages, and the group priviledges)

Any idea how to fix?

SomberNight commented 1 year ago

This is due to version incompatibility with the ledger-bitcoin library.

electrum 4.4.2: https://github.com/spesmilo/electrum/blob/ff287e518fcc34010420ce413c95dd790ab544bd/contrib/requirements/requirements-hw.txt#L18

electrum 4.4.3: https://github.com/spesmilo/electrum/blob/a6f3ee6364e4ad667ceb146bf0c951659cecd6f5/contrib/requirements/requirements-hw.txt#L18

qherring commented 1 year ago

thank you sir. now it works great

I ran: python3 -m pip install ledger-bitcoin==0.1.1

I did not know there was a v4.4.3