I'm having trouble getting this script to talk to bitshares through the RPC.
I have confirmed that doing this, yields a positive result:
curl --user `grep rpc_user ~/.BitShares/config.json | cut -d ":" -f 2 | tr -d " \",\n"`:`grep rpc_password ~/.BitShares/config.json | cut -d ":" -f 2 | tr -d " \",\n"` --data-binary '{"method":"about", "params": [], "json-rpc": 2.0, "id": 0}' -H 'content-type: text/plain;' http://localhost:9989/rpc
Yet every call to the feeds script results in an error about zero parameters and I can't even ctrl-c the script to stop it running. Any advice about how to diagnose this?
Traceback (most recent call last):
File "./bts_feed_auto.py", line 272, in <module>
fetch_price()
File "./bts_feed_auto.py", line 221, in fetch_price
print '{: >6}'.format("ASSET"), '{: >10}'.format("MEDIAN"), '{: >10}'.format("PUBLISH"), '{: >10}'.format("REAL"),'{: >8}'.format("CHANGE"),'{: >16}'.format("RATE(CNY/ASSET)"), "| CURRENT PRICE", time.strftime("(%Y%m%dT%H%M%S)", time.localtime(time.time()))
ValueError: zero length field name in format
p.s. I have configured the config script with the correct rpc username and password.