Electrum: 2.6.3 jsonrpclib.jsonrpc.ProtocolError

Created on 20 Mar 2016  路  8Comments  路  Source: spesmilo/electrum

I get the above error when calling electrum broadcast <tx>. It worked until 2.5.4. <tx> is valid, since I can broadcast it with 2.5.4 and it gets confirmed.

Traceback (most recent call last):
  File "/usr/local/bin/electrum", line 371, in <module>
    result = server.run_cmdline(config_options)
  File "/usr/local/lib/python2.7/dist-packages/jsonrpclib/jsonrpc.py", line 288, in __call__
    return self.__send(self.__name, args)
  File "/usr/local/lib/python2.7/dist-packages/jsonrpclib/jsonrpc.py", line 238, in _request
    check_for_errors(response)
  File "/usr/local/lib/python2.7/dist-packages/jsonrpclib/jsonrpc.py", line 567, in check_for_errors
    raise ProtocolError((code, message))
jsonrpclib.jsonrpc.ProtocolError: (-32700, u'Request {"jsonrpc": "2.0", "params": [{"verbose": false, "tx": {"raw": "010000000.........", "_inputs": null, "_outputs": null, "__jsonclass__": ["electrum.transaction.Transaction", []]}, "cmd": "broadcast", "timeout": 30, "password": null, "cwd": "/home/user/test", "portable": false}], "id": "42gbswnq", "method": "run_cmdline"} invalid. (__init__() takes exactly 2 arguments (1 given))')

[Ubuntu 14.04 LTS - 64 bit]

Most helpful comment

the problem is fixed in git master.
use it, or wait for next release

All 8 comments

I can reproduce it. I will fix ASAP

the regression was introduced in 9659e8542d716dc1d87b4064906c444e4f18a95a

Thanks a lot. broadcast works now and is accepted by mempools.

What format is the output of electrum broadcast? It changed since 2.5.4. In 2.5.4 it just returned the txid. Now it returns more. Is that valid json fromat?

Here is what I see:

[
    true, 
    "e5021......"
]

yes, the boolean shows the success/failure of the operation

I see. Is it possible to use the same format as with e.g. electrum payto? Would be easier to process, since output is more uniform. Thanks.

electrum payto json output:

{
    "complete": true, 
    "hex": "010000000...."
}

I have the same problem how can I fix it ?

the problem is fixed in git master.
use it, or wait for next release

Awesome thank you for the quick reply :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dl3br picture dl3br  路  4Comments

juniorjp picture juniorjp  路  5Comments

shawnpringle picture shawnpringle  路  3Comments

Kixunil picture Kixunil  路  4Comments

GuestInCorle picture GuestInCorle  路  3Comments