spesmilo / spesmilo/electrum

TypeError: list indices must be integers or slices, not str

Open
#5,906 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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 "/usr/lib64/python3.6/site-packages/electrum/gui/qt/__init__.py", line 215, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/lib64/python3.6/site-packages/electrum/gui/qt/__init__.py", line 239, in start_new_window
    wallet = self._start_wizard_to_select_or_create_wallet(path)
  File "/usr/lib64/python3.6/site-packages/electrum/gui/qt/__init__.py", line 294, in _start_wizard_to_select_or_create_wallet
    wallet = Wallet(storage)
  File "/usr/lib64/python3.6/site-packages/electrum/wallet.py", line 1995, in __new__
    wallet = WalletClass(storage)
  File "/usr/lib64/python3.6/site-packages/electrum/wallet.py", line 1826, in __init__
    Deterministic_Wallet.__init__(self, storage)
  File "/usr/lib64/python3.6/site-packages/electrum/wallet.py", line 1676, in __init__
    Abstract_Wallet.__init__(self, storage)
  File "/usr/lib64/python3.6/site-packages/electrum/wallet.py", line 214, in __init__
    self.storage.db.load_addresses(self.wallet_type)
  File "/usr/lib64/python3.6/site-packages/electrum/json_db.py", line 745, in load_addresses
    self.data['addresses'][name] = []

TypeError: list indices must be integers or slices, not str

Reporter

This issue was reported by 1 user(s):

Electrum Version Python Version Operating System Wallet Type Locale Stack
3.3.8 3.6.10 (default, Jan 7 2020, 14:09:28) [GCC 9.1.0] Linux-5.1.0-gentoo-ppc64le-POWER9,_altivec_supported-with-gentoo-2.6 standard en_US

Additional Information

Open old wallet file from previous installation, much older than current.


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/json_db.py at load_addresses, then trace the wallet-loading path through electrum/wallet.py and the traceback's callers in electrum/gui/qt/init.py. Use the reported old wallet scenario to investigate the incompatible data shape; done means the wallet no longer crashes with this TypeError when opened.

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
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.