Skip to content

[Solved] 2.8.3 won't start : ValueError: dictionary update sequence element #0 has length ... #2472

Description

@Daxx
Traceback (most recent call last):
  File "/usr/local/bin/electrum", line 379, in <module>
    d.init_gui(config, plugins)
  File "/usr/local/lib/python2.7/dist-packages/electrum/daemon.py", line 283, in init_gui
    self.gui.main()
  File "/usr/local/lib/python2.7/dist-packages/electrum_gui/qt/__init__.py", line 200, in main
    if not self.start_new_window(path, self.config.get('url')):
  File "/usr/local/lib/python2.7/dist-packages/electrum_gui/qt/__init__.py", line 157, in start_new_window
    wallet = self.daemon.load_wallet(path, None)
  File "/usr/local/lib/python2.7/dist-packages/electrum/daemon.py", line 220, in load_wallet
    wallet = Wallet(storage)
  File "/usr/local/lib/python2.7/dist-packages/electrum/wallet.py", line 1757, in __new__
    wallet = WalletClass(storage)
  File "/usr/local/lib/python2.7/dist-packages/electrum/wallet.py", line 1564, in __init__
    Deterministic_Wallet.__init__(self, storage)
  File "/usr/local/lib/python2.7/dist-packages/electrum/wallet.py", line 1409, in __init__
    Abstract_Wallet.__init__(self, storage)
  File "/usr/local/lib/python2.7/dist-packages/electrum/wallet.py", line 134, in __init__
    self.contacts = Contacts(self.storage)
  File "/usr/local/lib/python2.7/dist-packages/electrum/contacts.py", line 41, in __init__
    self.update(d)
ValueError: dictionary update sequence element #0 has length 34; 2 is required

ValueError: dictionary update sequence element #0 has length 34; 2 is required

I had just installed 2.8.3 over 2.7.13 (bug manifests > 2.7.18, i.e. 2.8.x)

At some point, the invalid "contacts" data, below, was added to the wallet causing the error:

    "contacts": [
        "18iVFy6oVw197jFmxxxujA3xMwTp68b2Ea"
    ], 

That string happens to be length 34, so the length in the error message could vary.

Deleting this section (NOT RECOMMENDED) allowed 2.8.3 to start, then I found:
Wallet -> Contacts -> Import
... which took the data from my old .electrum/contacts file (not sure if this is used any more?)

Now the fixed wallet data looks like this:

    "contacts": {
        "18iVFy6oVw197jFmxxxujA3xMwTp68b2Ea": [
            "address", 
            "bitcointicker.co"
        ] 
    }, 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions