Search content
Sort by

Showing 5 of 5 results by rajalaxmi
Post
Topic
Board Bitcoin Technical Support
Re: python-bitcoinrpc: modulenotfounderror no module named 'bitcoinrpc'
by
rajalaxmi
on 16/03/2019, 03:59:28 UTC
Is there a video tutorial on Youtube/elsewhere on how to make json-rpc calls from python, or to use this python-bitcoinrpc library? The instructions are very sparse on the github page and I'm keen to learn this. I'm sure many people are as keen as I am, but I can't find any such video.
Post
Topic
Board Bitcoin Technical Support
Re: python-bitcoinrpc: modulenotfounderror no module named 'bitcoinrpc'
by
rajalaxmi
on 15/03/2019, 11:58:54 UTC
Thanksfor your reply! How/ where do I adjust the path, please? I installed the package directly using "pip3 install python-bitcoinrpc". And then I tried importing it from within my python script (I use spyder IDE). Sorry for the noob question but where should I be adjusting paths and what should the new path be, please?
Post
Topic
Board Bitcoin Technical Support
Re: python-bitcoinrpc: modulenotfounderror no module named 'bitcoinrpc'
by
rajalaxmi
on 15/03/2019, 10:28:54 UTC
Thank you for your reply. Afraid I haven't tried with python 2.7. I'm new to python and have spent quite a lot of time making stuff with python 3 so I would like to avoid moving to python 2 now. Would you happen to know any other way in which I can make the json-rpc calls to bitcoind from python 3? Appreciate your help.
Post
Topic
Board Bitcoin Technical Support
Merits 2 from 2 users
Topic OP
python-bitcoinrpc: modulenotfounderror no module named 'bitcoinrpc'
by
rajalaxmi
on 15/03/2019, 09:03:55 UTC
⭐ Merited by LoyceV (1) ,ETFbitcoin (1)
I'm running bitcoind/ bitcoind -regtest on Windows 10 and am already able to use bitcoin-cli -regtest along with json-rpc methods to perform basic operations and get balances etc. When I try to do this programmatically on python 3 using Jeff Garzik's python-bitcoinrpc package (https://github.com/jgarzik/python-bitcoinrpc) I get a modulenotfounderror. However, my pip3 freeze shows python-bitcoinlib==0.10.1 and also python-bitcoinrpc==1.0.

My code is below (18443 is the regtest port):
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException

rpc_connection = AuthServiceProxy("http://%s:%s@127.0.0.1:18443"%("myrpcuser", "myrpcpassword"))
best_block_hash = rpc_connection.getbestblockhash()
print(rpc_connection.getblock(best_block_hash))

What am I doing wrong?
Post
Topic
Board Marketplace (India)
Re: I want to buy BTC with INR
by
rajalaxmi
on 24/10/2018, 12:50:37 UTC
PM me