I put this one together that claims "no JSON object could be decoded".

from bitcoinrpc.authproxy import AuthServiceProxy

access = AuthServiceProxy("http://user:password@")


print printme

My bitcoin core wallet is set to "server=1" and "listen=1", but it is currently downloading the blockchain (idk if that would have an impact).

2 Answers 2


If you are still downloading the blockchain and you haven't downloaded and verified that transaction yet, then of course you will get an error when you try to look it up, Bitcoin Core doesn't know about it yet!

Furthermore, if that transaction is not part of your wallet or in the UTXO set (i.e. one of the outputs is unspent), then getrawtransaction won't work. Bitcoin Core can only retrieve arbitrary transactions if you have enabled the transaction index with txindex=1.


need to download blocks from the server Maybe you can try on this (python 3) You need to install bitcoinrpc

import json
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException

rpc_connection = AuthServiceProxy("http://%s:%s@"%("rpc_username", "rpc_password"))
result = rpc_connection.getrawtransaction  ("52309405287e737cf412fc42883d65a392ab950869fae80b2a5f1e33326aca46")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.