<p>That particular API client library does not yet implement all calls that are exposed by <code>bitcoind</code>. See the <a href="http://laanwj.github.com/bitcoin-python/doc/bitcoinrpc.connection.html" rel="nofollow">API documentation</a> for a list of calls that are implemented.</p>

<p>The problem is that your Bitcoin client knows about <code>getrawtransaction</code> but the python library you're using to connect to it does not know what to do with it yet.</p>

CC BY-SA 3.0
2013-01-16T19:38:53.300Z
2013-01-16T19:38:53.300Z
cdecker
<p>While cdecker technically answers the question posed, I found that the best solution around the problem is to use the following package to connect with <code>bitcoind</code>:</p>

<p><a href="https://github.com/jgarzik/python-bitcoinrpc" rel="nofollow">https://github.com/jgarzik/python-bitcoinrpc</a></p>

CC BY-SA 3.0
2013-01-17T08:45:30.503Z
If you're just looking for a JSON-RPC client lib in python then https://github.com/joshmarshall/jsonrpclib might be your thing.
cdecker
CC BY-SA 3.0
2013-01-16T20:51:46.443Z
2013-01-16T20:51:46.443Z
Sanjay
<p>I am writing an web application using Python/Flask. I am using</p>

<p><a href="http://laanwj.github.com/bitcoin-python/doc/" rel="nofollow">http://laanwj.github.com/bitcoin-python/doc/</a></p>

<p>to connect to my bitcoind 0.7.2 server as follows:</p>

<pre><code>conn = bitcoinrpc.connect_to_local()
accounts = conn.listaccounts(0)
</code></pre>

<p>This is all working well. However, when I attempt to use some of the newer raw transaction calls, I get an error. For example,</p>

<pre><code>raw_transaction = conn.getrawtransaction(txid)
</code></pre>

<p>results in the following error:</p>

<pre><code>AttributeError: 'BitcoinConnection' object has no attribute 'getrawtransaction'
</code></pre>

<p>It seems (though I am not sure) that the methods that don't work for me are those that are listed here:</p>

<p><a href="https://en.bitcoin.it/wiki/Raw_Transactions" rel="nofollow">https://en.bitcoin.it/wiki/Raw_Transactions</a></p>

<p>Thanks to anyone who can help on this.</p>

CC BY-SA 3.0
2013-01-16T20:52:00.660Z
While cdecker technically answers the question posed, I found that the best solution around the problem is to use the following package to connect with bitcoind:

https://github.com/jgarzik/python-bitcoinrpc
Sanjay
<bitcoind>
Why does bitcoind (0.7.2) give an error when trying to issue getrawtransaction over RPC?
Sanjay
# Why does bitcoind (0.7.2) give an error when trying to issue getrawtransaction over RPC?

(Asked by: username_0 on 2013-01-16)

I am writing an web application using Python/Flask. I am using
http://laanwj.github.com/bitcoin-python/doc/
to connect to my bitcoind 0.7.2 server as follows:
conn = bitcoinrpc.connect_to_local()
accounts = conn.listaccounts(0)

This is all working well. However, when I attempt to use some of the newer raw transaction calls, I get an error. For example,
raw_transaction = conn.getrawtransaction(txid)

results in the following error:
AttributeError: 'BitcoinConnection' object has no attribute 'getrawtransaction'

It seems (though I am not sure) that the methods that don't work for me are those that are listed here:
https://en.bitcoin.it/wiki/Raw_Transactions
Thanks to anyone who can help on this.

**Tags:** bitcoind

> **Comments:**
> **username_0**: While username_1 technically answers the question posed, I found that the best solution around the problem is to use the following package to connect with bitcoind:  https://github.com/jgarzik/python-bitcoinrpc  

---

## 2 answers

### Answer by username_1 on 2013-01-16. Score: 2 | Accepted answer

That particular API client library does not yet implement all calls that are exposed by `bitcoind`. See the [API documentation](http://laanwj.github.com/bitcoin-python/doc/bitcoinrpc.connection.html) for a list of calls that are implemented.

The problem is that your Bitcoin client knows about `getrawtransaction` but the python library you're using to connect to it does not know what to do with it yet.


---

### Answer by username_0 on 2013-01-16. Score: 1

While username_1 technically answers the question posed, I found that the best solution around the problem is to use the following package to connect with `bitcoind`:

<https://github.com/jgarzik/python-bitcoinrpc>

> **Comments:**
> **username_1**: If you're just looking for a JSON-RPC client lib in python then https://github.com/joshmarshall/jsonrpclib might be your thing.  

---

