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

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

CC BY-SA 3.0
2016-01-05T12:07:57.667Z
2016-01-05T12:07:57.667Z
ThePhi
<p>I'm starting with <a href="https://github.com/jgarzik/python-bitcoinrpc" rel="nofollow">python-bitcoinrpc</a> from J.Garzik.</p>

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

<p>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:</p>

<pre><code>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()
print(NEW_ADDRESS)
</code></pre>

<p>But now:</p>

<pre><code>from bitcoinrpc.authproxy import AuthServiceProxy

access = AuthServiceProxy() 
info = access.getinfo() # Not WORKING: info is None
</code></pre>

<p>That's okay for me, and very shorter.</p>

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

<pre><code>logging.basicConfig()
logging.getLogger("BitcoinRPC").setLevel(logging.DEBUG)

rpc_connection = AuthServiceProxy("http://%s:%s@127.0.0.1:8332"%(rpc_user, rpc_password))
print(rpc_connection.getinfo())
</code></pre>

<p>But how do you put that into a variable??
Like with:</p>

<p><code>info = access.getinfo()</code>
(which is not working: <code>info</code>is <code>None</code></p>

<python>
python-bitcoinrpc: only DEBUG available?
ThePhi
# python-bitcoinrpc: only DEBUG available?

(Asked by: username_0 on 2016-01-04)

I'm starting with [python-bitcoinrpc](https://github.com/jgarzik/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()
print(NEW_ADDRESS)

```

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

```
logging.basicConfig()
logging.getLogger("BitcoinRPC").setLevel(logging.DEBUG)

rpc_connection = AuthServiceProxy("http://%s:%s@127.0.0.1:8332"%(rpc_user, rpc_password))
print(rpc_connection.getinfo())

```

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

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

**Tags:** python


---

## 1 answers

### Answer by username_0 on 2016-01-05. Score: 2

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

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


---

