What is the simplest python program that would query the bitcoin core client for a raw tx? I put this one together that claims "no JSON object could be decoded".


  from bitcoinrpc.authproxy import AuthServiceProxy 
  
  access =
  AuthServiceProxy("http://user:password@127.0.0.1:8332") 
  
  printme=access.getrawtransaction("6359f0868171b1d194cbee1af2f16ea598ae8fad666d9b012c8ed2b79a236ec4")
  
  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).
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.