Bitcoin Forum
May 23, 2024, 02:31:19 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: python-bitcoinrpc (jgarzik) problem calling gettransaction()  (Read 675 times)
kangarooz (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
May 24, 2014, 05:38:19 PM
Last edit: May 24, 2014, 05:55:14 PM by kangarooz
 #1

Dear guys;

I use this code:

Code:
from bitcoinrpc.authproxy import *

access = AuthServiceProxy("PRIVATEDETAILS")

print access.getbalance()
txid = 'aedf77851ee49a85857126b9003f8058c355c7e30e51a8ef5c74042a73ab247f'
printa = access.gettransaction(txid)

It doens't work.
Python gaves me this error:
Quote
   raise JSONRPCException(response['error'])
bitcoinrpc.authproxy.JSONRPCException

The call of function access.getbalance() works fine.
Any idea how to fix this?

Kind regards;
RoxxR
Full Member
***
Offline Offline

Activity: 208
Merit: 148


View Profile
May 24, 2014, 06:07:58 PM
 #2

Dear guys;

I use this code:

Code:
from bitcoinrpc.authproxy import *

access = AuthServiceProxy("PRIVATEDETAILS")

print access.getbalance()
txid = 'aedf77851ee49a85857126b9003f8058c355c7e30e51a8ef5c74042a73ab247f'
printa = access.gettransaction(txid)

It doens't work.
Python gaves me this error:
Quote
   raise JSONRPCException(response['error'])
bitcoinrpc.authproxy.JSONRPCException

The call of function access.getbalance() works fine.
Any idea how to fix this?

Kind regards;

I've had this issue a while ago and resolved it. I will need to look through my code samples and post the exact solution shortly. I'd appreciate a small tip to the following address if it resolves your problem:
1JEEELLkkn2Wu3oVNdXbbkbMAtpgFaTwfo
RoxxR
Full Member
***
Offline Offline

Activity: 208
Merit: 148


View Profile
May 24, 2014, 06:11:40 PM
 #3

Here we go. This works for me:

Code:
     txid = 'aedf77851ee49a85857126b9003f8058c355c7e30e51a8ef5c74042a73ab247f'
     rawtx = access.getrawtransaction(txid)
     decodedtx = access.decoderawtransaction(rawtx)
kangarooz (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 0


View Profile
May 24, 2014, 06:20:37 PM
 #4

Sorry hombre:

Quote
   rawtx = access.getrawtransaction(txid)
  File "/usr/local/lib/python2.7/dist-packages/bitcoinrpc/authproxy.py", line 116, in __call__
    raise JSONRPCException(response['error'])
bitcoinrpc.authproxy.JSONRPCException

Any other idea?
It's frustrating to work with documentations which aren't able to work ;O(.
RoxxR
Full Member
***
Offline Offline

Activity: 208
Merit: 148


View Profile
May 24, 2014, 08:18:59 PM
 #5

Sorry hombre:

Quote
   rawtx = access.getrawtransaction(txid)
  File "/usr/local/lib/python2.7/dist-packages/bitcoinrpc/authproxy.py", line 116, in __call__
    raise JSONRPCException(response['error'])
bitcoinrpc.authproxy.JSONRPCException

Any other idea?
It's frustrating to work with documentations which aren't able to work ;O(.

What's the version of the bitcoind you're connecting to?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!