<p>The library did not have an update in 3 years. The <code>getinfo</code> call it attempts has been deprecated for a while and was removed with the 0.16 release of bitcoind. The solution here is to abandon the library and look for other options. Doing the rpc queries directly with python is not very hard.</p>

CC BY-SA 3.0
2018-03-18T10:47:41.970Z
2018-03-18T10:47:41.970Z
blues
<p>I was happily using bitcoinrpc until I moved to python3 (python3.6.4 at the moment) and it stops working. Now I'm trying to use this one: <a href="https://github.com/XertroV/bitcoin-python3" rel="nofollow noreferrer">https://github.com/XertroV/bitcoin-python3</a>
After completing install I run the code:</p>

<blockquote>
  <p>import bitcoinrpc</p>
  
  <p>access = bitcoinrpc.connect_to_local()<br>
  access.getinfo()</p>
</blockquote>

<p>Getting the following error:</p>

<blockquote>
  <p>Traceback (most recent call last):   File
  "/home/phglz/Desktop/Satoshing/backend.py", line 8, in 
      access.getinfo()   File "/usr/local/lib/python3.6/dist-packages/bitcoin_python3-0.3.1-py3.6.egg/bitcoinrpc/connection.py",
  line 133, in getinfo   File
  "/usr/local/lib/python3.6/dist-packages/bitcoin_python3-0.3.1-py3.6.egg/bitcoinrpc/proxy.py",
  line 116, in <strong>call</strong>   File
  "/usr/local/lib/python3.6/dist-packages/bitcoin_python3-0.3.1-py3.6.egg/bitcoinrpc/proxy.py",
  line 67, in request   File "/usr/lib/python3.6/http/client.py", line
  1239, in request
      self._send_request(method, url, body, headers, encode_chunked)   File "/usr/lib/python3.6/http/client.py", line 1285, in _send_request
      self.endheaders(body, encode_chunked=encode_chunked)   File "/usr/lib/python3.6/http/client.py", line 1234, in endheaders
      self._send_output(message_body, encode_chunked=encode_chunked)   File "/usr/lib/python3.6/http/client.py", line 1026, in _send_output
      self.send(msg)   File "/usr/lib/python3.6/http/client.py", line 964, in send
      self.connect()   File "/usr/lib/python3.6/http/client.py", line 936, in connect
      (self.host,self.port), self.timeout, self.source_address)   File "/usr/lib/python3.6/socket.py", line 712, in create_connection
      sock.bind(source_address) TypeError: getsockaddrarg: AF_INET address must be tuple, not int</p>
</blockquote>

<p>This issue has been posted before but not solution has been reported. I searched all over the web as much as I could.</p>

<p>If someone out there has an idea of what could be wrong I would appreciate his knowledge.<br>
Thanks a lot.</p>

<p>Felipe</p>

CC BY-SA 3.0
2018-04-19T06:14:53.673Z
I actually asked a more generic question about Python libraries to interact with Bitcoin-Core. https://bitcoin.stackexchange.com/questions/73815/need-advice-for-python-interaction-with-bitcoin-core-wallet but haven't got any answer. If you are interested, would you please upvote to attract some attentions?
Will Gu
<json-rpc>
bitcoinrpc error
Felipe Galaz
# bitcoinrpc error

(Asked by: username_0 on 2018-03-18)

I was happily using bitcoinrpc until I moved to python3 (python3.6.4 at the moment) and it stops working. Now I'm trying to use this one: <https://github.com/XertroV/bitcoin-python3>
After completing install I run the code:

> import bitcoinrpc
>
> access = bitcoinrpc.connect\_to\_local()  
> access.getinfo()

Getting the following error:

> Traceback (most recent call last): File
> "/home/phglz/Desktop/Satoshing/backend.py", line 8, in
> access.getinfo() File "/usr/local/lib/python3.6/dist-packages/bitcoin\_python3-0.3.1-py3.6.egg/bitcoinrpc/connection.py",
> line 133, in getinfo File
> "/usr/local/lib/python3.6/dist-packages/bitcoin\_python3-0.3.1-py3.6.egg/bitcoinrpc/proxy.py",
> line 116, in **call** File
> "/usr/local/lib/python3.6/dist-packages/bitcoin\_python3-0.3.1-py3.6.egg/bitcoinrpc/proxy.py",
> line 67, in request File "/usr/lib/python3.6/http/client.py", line
> 1239, in request
> self.\_send\_request(method, url, body, headers, encode\_chunked) File "/usr/lib/python3.6/http/client.py", line 1285, in \_send\_request
> self.endheaders(body, encode\_chunked=encode\_chunked) File "/usr/lib/python3.6/http/client.py", line 1234, in endheaders
> self.\_send\_output(message\_body, encode\_chunked=encode\_chunked) File "/usr/lib/python3.6/http/client.py", line 1026, in \_send\_output
> self.send(msg) File "/usr/lib/python3.6/http/client.py", line 964, in send
> self.connect() File "/usr/lib/python3.6/http/client.py", line 936, in connect
> (self.host,self.port), self.timeout, self.source\_address) File "/usr/lib/python3.6/socket.py", line 712, in create\_connection
> sock.bind(source\_address) TypeError: getsockaddrarg: AF\_INET address must be tuple, not int

This issue has been posted before but not solution has been reported. I searched all over the web as much as I could.

If someone out there has an idea of what could be wrong I would appreciate his knowledge.  
Thanks a lot.

username_0

**Tags:** json-rpc

> **Comments:**
> **username_1**: I actually asked a more generic question about Python libraries to interact with Bitcoin-Core. https://bitcoin.stackexchange.com/questions/73815/need-advice-for-python-interaction-with-bitcoin-core-wallet but haven't got any answer. If you are interested, would you please upvote to attract some attentions?  

---

## 1 answers

### Answer by username_2 on 2018-03-18. Score: 1

The library did not have an update in 3 years. The `getinfo` call it attempts has been deprecated for a while and was removed with the 0.16 release of bitcoind. The solution here is to abandon the library and look for other options. Doing the rpc queries directly with python is not very hard.


---

