0

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.

Felipe

1
  • I actually asked a more generic question about Python libraries to interact with Bitcoin-Core. bitcoin.stackexchange.com/questions/73815/… but haven't got any answer. If you are interested, would you please upvote to attract some attentions?
    – Will Gu
    Apr 19, 2018 at 6:14

1 Answer 1

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.

0

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.