Sunday 15 January 2012

OSError: [Errno 7] Argument list too long on ubuntu, python calling bitcoind-cli with popen -



OSError: [Errno 7] Argument list too long on ubuntu, python calling bitcoind-cli with popen -

running python script calling bitcoind-cli using popen on ubuntu, on big blocks many trasactions, when calling getrawtransaction error oserror: [errno 7] argument list long

i understand it's buffer issue between shell , python script? there's single argument, guess it's long 1

need check else? can create buffer larger somehow or should alter method interact bitcoind rpc?

tried on local , aws ubuntu machines

thanks

since using python, best thing can utilize rpc, such as:

import base64 import requests response = requests.post( bitcoind_url, data=json.dumps( { 'method': method, 'params': params, 'jsonrpc': '2.0', 'id': 0, } ), headers={'content-type': 'application/json', 'authorization': b'basic ' + base64.b64encode(rpcuser + b':' + rpcpassword)})

where params list of arguments specific method.

you can rpcuser , rpcpassword bitcoind configuration file.

python popen bitcoind

No comments:

Post a Comment