Bitcoin Forum

Bitcoin => Electrum => Topic started by: Cryptowatch.com on May 11, 2015, 03:55:58 AM



Title: [SOLVED] Command 'history' gives error.
Post by: Cryptowatch.com on May 11, 2015, 03:55:58 AM
Version: Electrum 2.1.1

According to 'python electrum help history': Returns the transaction history of your wallet

However:

'python electrum history' gives:

Code:
Traceback (most recent call last):
  File "electrum", line 165, in run_command
    result = func(*args[1:])
  File "/path/electrum/Electrum-2.1.1/lib/commands.py", line 346, in history
    tx_hash, conf, is_mine, value, fee, balance, timestamp = item
ValueError: need more than 5 values to unpack

Anyone familiar with this?


Title: Re: Command 'history' gives error.
Post by: Tachikoma on May 11, 2015, 07:22:22 AM
This was fixed on the 28th of April and will be in the next version.

If you are able you could use the development version from https://github.com/spesmilo/electrum until the next release.


Title: Re: [SOLVED] Command 'history' gives error.
Post by: Cryptowatch.com on May 12, 2015, 09:26:57 AM
Anyway, as I wanted to use 2.1.1, the simple fix for this issue is as follows:

edit Electrum-2.1.1/lib/commands.py

Find line in def history saying:

Code:
tx_hash, conf, is_mine, value, fee, balance, timestamp = item

switch it with

Code:
tx_hash, conf, value, timestamp, balance = item


Edit: Diffed against released version, so this should be the correct fix.