Comments (3)
I assume the signature of simple_transaction
or its alias create
is confusing. This is a good reason to improve it.
It looks like you are passing a tuple for the from_address
parameter. For example, the following works:
from transactions import Transactions
alice = 'mhyCaF2HFk7CVwKmyQ8TahgVdjnHSr1pTv'
bob = 'mqXz83H4LCxjf2ie8hYNsTRByvtfV43Pa7'
transactions = Transactions(testnet=True)
tx = transactions.create(alice, (bob, 10000))
but the following:
tx = transactions.create(('', alice), (bob, 10000))
will yield the error:
TypeError: list indices must be integers, not unicode
because the code is expecting a dict
, but it got a list, and tried to retrieve the value 'txs'
from the list:
[{u'address': u"(''",
u'limit_txs': 200,
u'nb_txs': 0,
u'nb_txs_displayed': 0,
u'txs': []},
{u'address': u" 'mhyCaF2HFk7CVwKmyQ8TahgVdjnHSr1pTv')",
u'limit_txs': 200,
u'nb_txs': 0,
u'nb_txs_displayed': 0,
u'txs': []}]
from transactions.
Haha figured this out too! :) thanks.
from transactions.
Ok! Will close the ticket then. 😄
from transactions.
Related Issues (15)
- rename simple_transaction to create HOT 1
- rename build_transaction to build, _build, or create_helper
- use rst for readme and parse it for pypi
- flatten the structure by bringing services modules up and possibly merging some togther
- rename maxTransactionFee to max_transaction_fee
- change the contributing section of the README HOT 1
- rename sign_transaction to sign HOT 1
- replace named variables "input" by a non built-in python name
- Find a way to programmatically refill testnet wallet of alice
- cannot import name 'Transactions' HOT 2
- Support Python 3
- Possible errors in the Theory / Coin Transfer and Double-spending sections HOT 1
- Ensure that wallets only use secrets created with the Base58 alphabet HOT 1
- transaction error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from transactions.