You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get an error at line 215: address = out["scriptPubKey"]["addresses"][0] as out["scriptPubKey"] doesn't contain an array of addresses, just one address field.
The error output:
1. Start nodes and setup scenario
Alice datadir: /tmp/tmpbbxd89kj
Starting Alice
Carol datadir: /tmp/tmp93qh56am
Starting Carol
2. Create an unsigned swap transaction in PSET format.
2a. Exchange addresses
Alice: el1qqw9eu5pqra2jj2jhf99tlluly2qyy9zk7p98u9d9ud7m4aeeg22c9gc3wpktl4k5ur2eunduagq2xgv6f2kxz36vph86t83tn
Carol: el1qqdf2v3yh7tuwe82cmwt4nnwrwmd6py0352u929dx9qyg3kzw6cw5k2xghjm0u48mr72ehyzdhw2d7y8qmykpzqulk4nrdkhpy
2b. Exchange partial transaction data
2c. Check partial transactions
2d. Create combined transaction
Traceback (most recent call last):
File "contrib/assets_tutorial/pset_swap_tutorial.py", line 215, in <module>
address = out["scriptPubKey"]["addresses"][0]
KeyError: 'addresses'
Shutting down Alice
Shutting down Carol
This was running Elements 0.22.0.2.
I can fix this by replacing:
out["scriptPubKey"]["addresses"][0]
with
out["scriptPubKey"]["address"]
which allows the example to complete, but I'm not sure if this obvious looking fix is missing some other subtleties.
The text was updated successfully, but these errors were encountered:
Running
python contrib/assets_tutorial/pset_swap_tutorial.py
I get an error at line 215:
address = out["scriptPubKey"]["addresses"][0]
asout["scriptPubKey"]
doesn't contain an array of addresses, just one address field.The error output:
This was running Elements 0.22.0.2.
I can fix this by replacing:
out["scriptPubKey"]["addresses"][0]
with
out["scriptPubKey"]["address"]
which allows the example to complete, but I'm not sure if this obvious looking fix is missing some other subtleties.
The text was updated successfully, but these errors were encountered: