spesmilo / spesmilo/electrum

None key in json wallet file - fails to serialize

Open
#4,589 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug 🐞 topic-walletstorage 💾
Dominant language
Python
Stars
8.6k
Forks
3.5k
Avg merge
2d 8h
Merged PRs (30d)
61

Description

Crash Report

This crash report was reported through the automatic crash reporting system 🤖

Traceback

  File "Electrum-3.2.2-py3.6.egg/electrum/util.py", line 856, in run_with_except_hook
  File "Electrum-3.2.2-py3.6.egg/electrum/network.py", line 1060, in run
  File "Electrum-3.2.2-py3.6.egg/electrum/network.py", line 1042, in wait_on_sockets
  File "Electrum-3.2.2-py3.6.egg/electrum/network.py", line 709, in process_responses
  File "Electrum-3.2.2-py3.6.egg/electrum/network.py", line 652, in process_response
  File "Electrum-3.2.2-py3.6.egg/electrum/verifier.py", line 116, in verify_merkle
  File "Electrum-3.2.2-py3.6.egg/electrum/wallet.py", line 305, in save_verified_tx
  File "Electrum-3.2.2-py3.6.egg/electrum/util.py", line 317, in <lambda>
  File "Electrum-3.2.2-py3.6.egg/electrum/util.py", line 313, in do_profile
  File "Electrum-3.2.2-py3.6.egg/electrum/storage.py", line 247, in write
  File "Electrum-3.2.2-py3.6.egg/electrum/storage.py", line 255, in _write
  File "json/__init__.py", line 238, in dumps
  File "json/encoder.py", line 201, in encode
  File "json/encoder.py", line 430, in _iterencode
  File "json/encoder.py", line 404, in _iterencode_dict
  File "json/encoder.py", line 353, in _iterencode_dict

TypeError: '<' not supported between instances of 'NoneType' and 'str'

Reporter

This issue was reported by 25 user(s):

Electrum Version Python Version Operating System Wallet Type Locale Stack
3.2.2 Darwin-17.7.0-x86_64-i386-64bit standard ?
3.2.2 Windows-7-6.1.7601-SP1 standard es_ES
3.2.2 Windows-10-10.0.17134-SP0 standard en_US
3.2.2 Windows-8.1-6.3.9600 standard en_US
3.2.2 Windows-8.1-6.3.9600 standard en_US
3.2.2 Windows-8.1-6.3.9600 standard en_US
3.2.2 Windows-10-10.0.17134-SP0 standard el_GR
3.2.2 Windows-10-10.0.16299-SP0 standard en_US
3.2.2 Windows-10-10.0.16299-SP0 standard en_US
3.2.3 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 02:47:15) [MSC v.1900 32 bit (Intel)] Windows-10-10.0.17134-SP0 standard en_US
3.2.3 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 02:47:15) [MSC v.1900 32 bit (Intel)] Windows-10-10.0.17134 standard es_CO
3.2.3 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 02:47:15) [MSC v.1900 32 bit (Intel)] Windows-7-6.1.7601-SP1 2fa en_US
3.2.3 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 02:47:15) [MSC v.1900 32 bit (Intel)] Windows-10-10.0.17134-SP0 standard en_US
3.2.3 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 02:47:15) [MSC v.1900 32 bit (Intel)] Windows-10-10.0.17134 standard de_DE
3.2.3 3.6.6 (v3.6.6:4cf1f54eb7, Jun 27 2018, 02:47:15) [MSC v.1900 32 bit (Intel)] Windows-7-6.1.7601-SP1 standard en_CA
3.2.2 Windows-10-10.0.17134-SP0 standard it_IT
3.2.3 3.6.8rc1 (default, Dec 12 2018, 06:12:40) [GCC 8.2.0] Linux-4.18.0-kali3-amd64-x86_64-with-Kali-kali-rolling-kali-rolling standard en_US
3.2.3 3.6.4 (default, Feb 28 2018, 03:24:19) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] Darwin-18.2.0-x86_64-i386-64bit standard ?
3.3.8 3.6.4 (default, Feb 28 2018, 03:24:19) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] Darwin-19.4.0-x86_64-i386-64bit standard ?
3.1.3 Windows-10-10.0.18362-SP0 standard en_US
4.2.1 3.9.11 (main, Jun 28 2018, 19:01:02) [GCC 7.5.0] Linux-5.10.0-13-amd64-x86_64-with-glibc2.31 standard pt_BR
4.2.1 3.9.11 (main, Jun 28 2018, 19:01:02) [GCC 7.5.0] Linux-4.19.0-20-amd64-x86_64-with-glibc2.28 standard pt_BR
4.4.1-27-ga2c0adf30-dirty 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] Linux-6.3.0-dirty-x86_64-with-glibc2.36 standard en_US
4.4.1-27-ga2c0adf30-dirty 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] Linux-6.3.0-dirty-x86_64-with-glibc2.36 standard en_US
4.6.2 3.12.11 (main, Jun 28 2018, 19:01:02) [GCC 10.2.1 20210110] Linux-6.1.0-39-amd64-x86_64-with-glibc2.36 standard pt_BR

Additional Information

I don't know. I'm screwing around with electrum and coinbase.


I switched to browser after using console, I noticed that green indicator become red, the green again, then red, etc, and in console there were walls of texts as if it were restarting several times


send to mnMMdmwkm5gXxbHmMYYgXbq6ChA2jATVEP


updating wallet password from encrypted wallet to unencrypted wallet w. keystore password


Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in electrum/storage.py at _write, where the traceback reaches json.dumps, and trace the data saved by wallet.py's save_verified_tx entry point. Reproduce the reported wallet-save failure and identify what produces the None key; done means wallet serialization completes without the TypeError and the reported crash path no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.