spesmilo / electrum

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

Cannot export private keys because one of them is corrupt #7612

Open DavidVeksler opened 2 years ago

DavidVeksler commented 2 years ago

I have a wallet with a large number of keys. One of them is corrupt.

When I export keys, the progress dialog hangs at "Please wait... 537/549"

Because of this, there is no way to bulk export any of the keys.

What I think should happen here is that the bad address should be printed in the export dialog so it can be removed.

SomberNight commented 2 years ago

Is this an imported wallet? (in menubar>Wallet>Information, what is Wallet type, Script type, Keystore type?) What do you mean one of the keys is corrupt? Why do you think so? Is there something relevant in the logs?

DavidVeksler commented 2 years ago

Wallet/Keystore type: imported

I imported all the keys. I'm just guessing there is something wrong with one of the keys:

D | util.profiler | AddressList.update 0.0000
Traceback (most recent call last):
  File "electrum/util.py", line 1063, in run_with_except_hook
  File "threading.py", line 870, in run
  File "electrum/gui/qt/main_window.py", line 2960, in privkeys_thread
  File "electrum/wallet.py", line 573, in export_private_key
  File "electrum/keystore.py", line 259, in get_private_key
KeyError: '[some string here]'

Let me know if you need more details.