TypeError: 'NoneType' object is not subscriptable
See original GitHub issueCrash Report
This crash report was reported through the automatic crash reporting system 🤖
Traceback
File "electroncash/util.py", line 830, in run_with_except_hook
File "electroncash/network.py", line 1503, in run
File "electroncash/network.py", line 1476, in wait_on_sockets
File "electroncash/network.py", line 892, in process_responses
File "electroncash/network.py", line 793, in process_response
File "electroncash/network.py", line 1545, in on_notify_header
File "electroncash/network.py", line 1610, in request_initial_proof_and_headers
File "electroncash/network.py", line 1564, in _process_latest_tip
File "electroncash/blockchain.py", line 143, in can_connect
File "electroncash/blockchain.py", line 586, in can_connect
File "electroncash/blockchain.py", line 485, in get_bits
File "electroncash/blockchain.py", line 447, in get_asert_anchor
File "electroncash/blockchain.py", line 405, in get_median_time_past
File "electroncash/blockchain.py", line 405, in <listcomp>
TypeError: 'NoneType' object is not subscriptable
Reporter
This issue was reported by 77 user(s):
Electron Cash Version | Python Version | Operating System | Wallet Type | Locale | Stack |
---|---|---|---|---|---|
4.2.0 | 3.6.9 (default, Oct 21 2020, 19:43:27) [GCC Clang 10.0.1 ] | Darwin-19.6.0-x86_64-i386-64bit | standard | ℹ | |
3.6.5 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.18362-SP0 | standard | en_NL | ℹ |
3.6.5 | 3.6.9 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] | Linux-4.19.0-12-amd64-x86_64-with-debian-10.7 | slp_standard | en_US | ℹ |
3.6.5 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.18362-SP0 | standard | en_US | ℹ |
3.6.5 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.18362-SP0 | standard | en_US | ℹ |
3.6.5 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | en_US | ℹ |
4.2.0 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | standard | en_US | ℹ |
3.6.5 | 3.6.9 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] | Linux-4.15.0-128-generic-x86_64-with-debian-buster-sid | slp_standard | en_ZA | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.18362-SP0 | slp_standard | da_DK | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.18362-SP0 | slp_standard | da_DK | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | standard | nl_NL | ℹ |
3.6.6 | 3.6.9 (default, Jan 1 2021, 13:37:04) [GCC 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.32.62)] | Darwin-18.6.0-x86_64-i386-64bit | slp_standard | ℹ | |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-7-6.1.7601-SP1 | slp_standard | zh_CN | ℹ |
3.6.6 | 3.6.9 (default, Jan 1 2021, 13:37:04) [GCC 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.32.62)] | Darwin-20.3.0-x86_64-i386-64bit | slp_standard | ℹ | |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | nl_BE | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-7-6.1.7601-SP1 | slp_standard | zh_CN | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_imported_privkey | en_US | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | en_US | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.18362-SP0 | slp_imported_privkey | da_DK | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.18362-SP0 | standard | zh_CN | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.18362-SP0 | standard | zh_CN | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.18362-SP0 | standard | zh_CN | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.14393-SP0 | slp_standard | ar_SA | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.14393-SP0 | slp_standard | ar_SA | ℹ |
3.6.6 | 3.6.9 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] | Linux-5.4.0-66-generic-x86_64-with-debian-bullseye-sid | slp_standard | en_US | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | nl_BE | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-7-6.1.7601-SP1 | slp_standard | en_PH | ℹ |
4.2.0 | 3.6.9 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] | Linux-5.8.0-44-generic-x86_64-with-debian-bullseye-sid | standard | zh_CN | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-7-6.1.7601-SP1 | slp_standard | en_PH | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | en_US | ℹ |
3.6.6 | 3.6.9 (default, Jan 1 2021, 13:37:04) [GCC 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.32.62)] | Darwin-18.7.0-x86_64-i386-64bit | slp_standard | ℹ | |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-7-6.1.7601-SP1 | slp_standard | en_PH | ℹ |
3.6.6 | 3.6.9 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] | Linux-5.4.0-67-generic-x86_64-with-debian-bullseye-sid | standard | en_ZA | ℹ |
3.6.6 | 3.6.9 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] | Linux-5.4.0-67-generic-x86_64-with-debian-bullseye-sid | slp_standard | en_ZA | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | tr_TR | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_imported_addr | en_NZ | ℹ |
3.6.6 | 3.6.9 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] | Linux-4.15.0-136-generic-x86_64-with-debian-buster-sid | slp_imported_privkey | es_AR | ℹ |
3.6.6 | 3.6.9 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] | Linux-5.8.0-48-generic-x86_64-with-debian-bullseye-sid | imported_privkey,slp_standard | en_US | ℹ |
3.6.6 | 3.6.9 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] | Linux-5.8.0-48-generic-x86_64-with-debian-bullseye-sid | slp_standard | en_US | ℹ |
3.6.6 | 3.6.9 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] | Linux-5.8.0-48-generic-x86_64-with-debian-bullseye-sid | slp_standard | en_US | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | ja_JP | ℹ |
3.6.6 | 3.6.9 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] | Linux-4.15.0-136-generic-x86_64-with-debian-buster-sid | slp_imported_privkey | es_AR | ℹ |
3.6.6 | 3.6.9 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] | Linux-5.10.23-1-MANJARO-x86_64-with-arch-Manjaro-Linux | standard | pl_PL | ℹ |
3.6.6 | 3.6.9 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] | Linux-5.11.2-gnu-1-x86_64-with-arch | slp_standard | ℹ | |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | standard | fr_BE | ℹ |
4.2.0 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.18362-SP0 | standard | en_US | ℹ |
3.6.6 | 3.6.9 (default, Jan 1 2021, 13:37:04) [GCC 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.32.62)] | Darwin-20.3.0-x86_64-i386-64bit | standard | ℹ | |
3.6.6 | 3.6.9 (default, Jan 1 2021, 13:37:04) [GCC 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.32.62)] | Darwin-20.2.0-x86_64-i386-64bit | slp_standard | ℹ | |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | en_US | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | en_US | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | en_US | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | en_US | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | en_US | ℹ |
3.6.6 | 3.6.9 (default, Jan 1 2021, 13:37:04) [GCC 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.32.62)] | Darwin-20.4.0-x86_64-i386-64bit | standard | ℹ | |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | en_GB | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | en_GB | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | en_GB | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | en_US | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | en_US | ℹ |
3.6.6 | 3.6.9 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] | Linux-4.15.0-142-generic-x86_64-with-debian-buster-sid | slp_standard | en_US | ℹ |
3.6.6 | 3.6.9 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] | Linux-4.15.0-142-generic-x86_64-with-debian-buster-sid | slp_standard | en_US | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.21382-SP0 | imported_privkey | en_US | ℹ |
3.6.6 | 3.6.9 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] | Linux-5.10.0-6-amd64-x86_64-with-debian-11.0 | slp_standard | en_US | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | en_GB | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.21382-SP0 | imported_privkey | en_US | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | zh_TW | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | de_DE | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | de_DE | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | de_DE | ℹ |
3.6.6 | 3.6.9 (default, Jan 1 2021, 13:37:04) [GCC 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.32.62)] | Darwin-20.6.0-x86_64-i386-64bit | standard | ℹ | |
3.6.6 | 3.6.9 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] | Linux-5.4.0-90-generic-x86_64-with-debian-bullseye-sid | slp_standard | en_ZA | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | standard | zh_TW | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | standard | es_AR | ℹ |
3.6.6 | 3.6.9 (default, Jun 28 2018, 19:01:02) [GCC 5.4.0 20160609] | Linux-5.4.0-96-generic-x86_64-with-debian-bullseye-sid | slp_standard | en_ZA | ℹ |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.22000-SP0 | slp_standard | en_US | ℹ |
3.6.6 | 3.6.9 (default, Jan 1 2021, 13:37:04) [GCC 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.32.62)] | Darwin-20.6.0-x86_64-i386-64bit | slp_standard | ℹ | |
3.6.6 | 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)] | Windows-10-10.0.19041-SP0 | slp_standard | en_US | ℹ |
Additional Information
i do not see my token tab on my wallet
SLP version 3.6.5 with flipstarter plugin just sitting open for a few minutes. 3rd time it’s crashed like this. wallet is empty and never had any funds in it. Windows 10 64 bit
BUG running 4.2 after 4.2.3. First I Setup a hardware wallet on 4.2.3. Sent some unsplit coins to a fresh address via fulcrum.fountainhead.cash. Then tried switching to electrum.bitcoinabc.org and it got added to the banlist automatically. Discovered I should be using 4.2. Downloaded the exe, checked the sha256. Closed 4.2.3. Opened 4.2.0, cleared the banlist, put electrum.bitcoinabc.org as the server, then switched tabs between addresses and send to see that i had to correct address. Crashed on the Send screen.
archie.bitcoin@gmail.com
Failed to mint token
Crashed while synchronizing
I was trying to send SLP tokens.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top GitHub Comments
It’s the same bug.
That whole codepath that scans for MTP should not be executed for blocks before the checkpoint. Why? Because we don’t have headers for blocks before the checkpoint. We don’t need to verify all of them – so we never download all of them; thus, there may be swiss-cheese holes in them. The bug was triggered when we iterated backward and encountered headers that are missing.
With the new asert fixes in 3f633185eec10145eb52df20b2c1f4ae6bd9483d, we won’t end up iterating backward to ask about blocks that do not exist in our header store. The whole thing was being executed due to an error in reasoning on my part. It never should have gotten there.
After the fix, the “bug” can never trigger because we won’t be asking the wrong question of the wrong data anymore. Thus you can’t get
None
for non-existant headers anymore.Stated simply: The reason for the bug is we were asking the wrong question of the wrong data. The fix is to not ask that question of the wrong data.
I don’t see how to reopen the bug, @cculianu.
This looks like a completely different bug to me, although I still don’t know the codebase too well.
The original crash report above shows that the error originates in the list comprehension that is assigned to
times
, and which callsread_header
.While your fix on 3f63318 is for
get_asert_anchor
.Am I missing something?
(And yes, my code above is at most a starting point or a stub).