Electrum: JsonRPC Payto is not working

Created on 11 Sep 2017  路  5Comments  路  Source: spesmilo/electrum

I'm using Electrum daemon 2.9.3 with Ubuntu 16.04 and tried with the command:

curl --data-binary '{"id":"curltext","method":"payto","params":{"destination":"TO_ADDRESS", "amount":"0.001"}}' http://127.0.0.1:7777

And it returns:
{"error": {"message": "Server error: File \"/usr/local/lib/python2.7/dist-packages/electrum/bitcoin.py\", line 768, in deserialize_xkey | TypeError: object of type 'NoneType' has no len()", "code": -32603}, "jsonrpc": "2.0", "id": "curltext"}

Most helpful comment

After further review, it worked when I added the 'password' variable with my wallet password.

As for "read the docs," the documentation on the RPC interface is absent.

All 5 comments

you need to load a wallet file first.
please read the docs

I loaded the wallet @ecdsa. I used electrum daemon load_wallet -w my_wallet, it returned true.

Yeah. My wallet's definitely loaded.

Exact same error. getbalance in RPC works just fine.

After further review, it worked when I added the 'password' variable with my wallet password.

As for "read the docs," the documentation on the RPC interface is absent.

It worked for me too after I added the 'password' field.

I think the error message should be more specific, and the docs too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GuestInCorle picture GuestInCorle  路  3Comments

dl3br picture dl3br  路  4Comments

karelbilek picture karelbilek  路  4Comments

cculianu picture cculianu  路  5Comments

fresheneesz picture fresheneesz  路  4Comments