electrum icon indicating copy to clipboard operation
electrum copied to clipboard

Restoring from hex crashes the wallet creation wizard

Open AbdussamadA opened this issue 10 years ago • 1 comments

This is probably related to the bug where restoring from old seed crashed the wallet creation wizard. Restoring from a seed in hex format crashes it too:


Traceback (most recent call last):
  File "/usr/bin/electrum", line 322, in <module>
    d.init_gui(config, plugins)
  File "/usr/lib/python2.7/site-packages/electrum/daemon.py", line 251, in init_gui
    self.gui.main()
  File "/usr/lib/python2.7/site-packages/electrum_gui/qt/__init__.py", line 186, in main
    if not self.start_new_window(path, self.config.get('url')):
  File "/usr/lib/python2.7/site-packages/electrum_gui/qt/__init__.py", line 163, in start_new_window
    wallet = wizard.run_and_get_wallet()
  File "/usr/lib/python2.7/site-packages/electrum_gui/qt/installwizard.py", line 192, in run_and_get_wallet
    self.run(action)
  File "/usr/lib/python2.7/site-packages/electrum/base_wizard.py", line 59, in run
    apply(f, args)
  File "/usr/lib/python2.7/site-packages/electrum/base_wizard.py", line 87, in new
    self.choice_dialog(title=title, message=message, choices=choices, run_next=self.on_wallet_type)
  File "/usr/lib/python2.7/site-packages/electrum_gui/qt/installwizard.py", line 90, in func_wrapper
    apply(run_next, out)
  File "/usr/lib/python2.7/site-packages/electrum/base_wizard.py", line 105, in on_wallet_type
    self.run(action)
  File "/usr/lib/python2.7/site-packages/electrum/base_wizard.py", line 59, in run
    apply(f, args)
  File "/usr/lib/python2.7/site-packages/electrum/base_wizard.py", line 137, in choose_keystore
    self.choice_dialog(title=title, message=message, choices=choices, run_next=self.run)
  File "/usr/lib/python2.7/site-packages/electrum_gui/qt/installwizard.py", line 90, in func_wrapper
    apply(run_next, out)
  File "/usr/lib/python2.7/site-packages/electrum/base_wizard.py", line 59, in run
    apply(f, args)
  File "/usr/lib/python2.7/site-packages/electrum/base_wizard.py", line 267, in restore_from_seed
    self.restore_seed_dialog(run_next=self.on_restore_seed, test=test)
  File "/usr/lib/python2.7/site-packages/electrum_gui/qt/installwizard.py", line 90, in func_wrapper
    apply(run_next, out)
  File "/usr/lib/python2.7/site-packages/electrum/base_wizard.py", line 279, in on_restore_seed
    self.run('create_keystore', seed, '')
  File "/usr/lib/python2.7/site-packages/electrum/base_wizard.py", line 59, in run
    apply(f, args)
  File "/usr/lib/python2.7/site-packages/electrum/base_wizard.py", line 295, in create_keystore
    k = keystore.from_seed(seed, passphrase)
  File "/usr/lib/python2.7/site-packages/electrum/keystore.py", line 677, in from_seed
    keystore.add_seed(seed)
  File "/usr/lib/python2.7/site-packages/electrum/keystore.py", line 368, in add_seed
    self.mpk = self.mpk_from_seed(self.seed)
  File "/usr/lib/python2.7/site-packages/electrum/keystore.py", line 396, in mpk_from_seed
    secexp = klass.stretch_key(seed)
  File "/usr/lib/python2.7/site-packages/electrum/keystore.py", line 405, in stretch_key
    x = hashlib.sha256(x + seed).digest()
TypeError: sha256() argument 1 must be string or buffer, not tuple`

The seed is this random number: b9be0a8838331a83b81f041dd3ff4876

electrum version is 2.7.2

AbdussamadA avatar Oct 07 '16 15:10 AbdussamadA

thanks.

ecdsa avatar Oct 07 '16 16:10 ecdsa