I'm starting with python-bitcoinrpc from J.Garzik.

I'm using to try it the code provided by James D'Angelo (from Bitcoin 101 on youtube):

Apparently, there were some major changes with python-bitcoinrpc, not taken into account by old tutorial as the ones from James since you don't do now:

from bitcoinrpc.util import *
from bitcoinrpc.exceptions import *
from bitcoinrpc.__init__ import *
from bitcoinrpc.config import *
from bitcoinrpc.proxy import *
from bitcoinrpc.data import *
from bitcoinrpc.connection import *

bitcoin = connect_to_local()
NEW_ADDRESS = bitcoin.getnewaddress()

But now:

from bitcoinrpc.authproxy import AuthServiceProxy

access = AuthServiceProxy() 
info = access.getinfo() # Not WORKING: info is None

That's okay for me, and very shorter.

The problem is to get access.getinfo()to a variable? According to the README from python-bitcoinrpc, you can use the logging module to print stderr to the screen


rpc_connection = AuthServiceProxy("http://%s:%[email protected]:8332"%(rpc_user, rpc_password))

But how do you put that into a variable?? Like with:

info = access.getinfo() (which is not working: infois None

1 Answer 1


Okay, there's a bug in the pip version of python-bitcoinrpc...

use pip install git+https://github.com/jgarzik/python-bitcoinrpc.git instead.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.