Seems like you're not the only one who's getting that "
Key Error" message;
This "
send Crash Report" issue suspiciously looks like the same as yours:
https://github.com/spesmilo/electrum/issues/6394
Try to find the private key from the wallet file itself, but that requires you to unencrypt the wallet.
First, disconnect from the internet or use an air-gap machine (
do not share any "private" info):
- 1. Remove the password of your wallet in 'Wallet->Password' type your password and leave the new/confirm password fields empty.
- 2. Then find your wallet file in the Electrum data directory/wallets (or where your wallet is stored), and open it using a text editor.
- 3. Lastly, find "keystore" and below it, there should be "keypairs" where you can find the address after its private key.
If you found seed and master keys along with your imported addresses, there's really something wrong with your wallet file.
Have you also considered post #5?
I already did extract Private keys from that wallet, they are not different from ones that i put in there before wit hexception, which is strange about 2 or 3 additional private keys i got when i returned keys to Bitcoin Core, one of them i cannot even get priv key from in my own wallet after import. I compared new wallet and old one, they are identical structure and code wise. I tried to manually reverse to 3.3.8 but it just aint working, guess the structure was not same, even tho it looks so similar after all it's just strings with info. Still waiting on Core to download blockchain. It's really not possible that my ancient 2 cents (over limit of minimal transaction) from new wallet also cannot sign and transfer. Even if problem was with connection i tried VPN result is same, sign and submit buttons are disabled.
I don't think imported wallet has master key, well even if it does i cannot extract it from Electrum i get error, i would try to punch it to Core. I guess it doesnt even have one as it's imported.
If i try to get key for most of addresses i get this
Traceback (most recent call last):
File "electrum\commands.py", line 188, in _run
File "concurrent\futures\_base.py", line 435, in result
File "concurrent\futures\_base.py", line 384, in __get_result
File "electrum\commands.py", line 151, in func_wrapper
File "electrum\commands.py", line 443, in getprivatekeys
File "electrum\wallet.py", line 531, in export_private_key
File "electrum\keystore.py", line 253, in get_private_key
File "electrum\json_db.py", line 44, in wrapper
File "electrum\json_db.py", line 129, in __getitem__
KeyError: 'various public keys'
If i try to get master key just says there is no such string as master key.