Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transaction error #74

Open
semyon-dev opened this issue Oct 16, 2018 · 0 comments
Open

transaction error #74

semyon-dev opened this issue Oct 16, 2018 · 0 comments

Comments

@semyon-dev
Copy link

semyon-dev commented Oct 16, 2018

Traceback (most recent call last):
  File "/home/semyon/Programming/Python/bitcoin/main.py", line 8, in <module>
    tx = transactions.create(alice, (bob, 117432))
  File "/home/semyon/Programming/Python/bitcoin/venv/lib/python3.6/site-packages/transactions/transactions.py", line 114, in simple_transaction
    inputs, change = self._select_inputs(from_address, amount, n_outputs, min_confirmations=min_confirmations)
  File "/home/semyon/Programming/Python/bitcoin/venv/lib/python3.6/site-packages/transactions/transactions.py", line 172, in _select_inputs
    unspents = self.get(address, min_confirmations=min_confirmations)['unspents']
  File "/home/semyon/Programming/Python/bitcoin/venv/lib/python3.6/site-packages/transactions/transactions.py", line 84, in get
    txs = self._service.list_transactions(hash, account=account, max_transactions=max_transactions)
  File "/home/semyon/Programming/Python/bitcoin/venv/lib/python3.6/site-packages/transactions/services/blockrservice.py", line 43, in list_transactions
    results = self.make_request(url)
  File "/home/semyon/Programming/Python/bitcoin/venv/lib/python3.6/site-packages/transactions/services/blockrservice.py", line 33, in make_request
    data = response.json()
  File "/home/semyon/Programming/Python/bitcoin/venv/lib/python3.6/site-packages/requests/models.py", line 896, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Process finished with exit code 1

code:

from transactions import Transactions
alice = 'mwPGBZJFoiELLADPES6E4JphUbw25Ju923'
bob = 'mySjpEjdrGsfhnmgX7rtcTtb7R9XGauwiV'
transactions = Transactions(testnet=True)
tx = transactions.create(alice, (bob, 6117432))
tx_signed = transactions.sign(tx, 'cTKusFK7wT8eGPXbfqLWJgQUEyg37BJmHpMJJ5ze3S******')
transactions.push(tx_signed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant