ejbaran / algorand-tutorials-python Goto Github PK
View Code? Open in Web Editor NEWTutorials of performing various functions on the Algorand blockchain using the Python SDK.
Tutorials of performing various functions on the Algorand blockchain using the Python SDK.
I am getting an over-spend error even though I have 20 test Algos when I try to create the asset. I am using the Sandbox node with the typical conventions. Could someone help me with this?
I'm working through the LaylaCoin Tutorial in the Algorand Developer Portal. First of all, Layla is too cute. Second, I made it pretty smoothly through step two, creating addresses and passphrases, as well as a hash for LaylaGyoza.jpg
. But, I ran into a problem on step three.
>>> from main import create
>>> from config import creator_passphrase
>>> create(creator_passphrase)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/brianhaney/node/LaylaCoin/main.py", line 22, in create
data = add_network_params(asset_details, client)
File "/Users/brianhaney/node/LaylaCoin/util.py", line 44, in add_network_params
params = client.suggested_params()
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/algosdk/algod.py", line 245, in suggested_params
return self.algod_request("GET", req, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/algosdk/algod.py", line 75, in algod_request
resp = urlopen(req)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 548, in _open
'unknown_open', req)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/urllib/request.py", line 1387, in unknown_open
raise URLError('unknown url type: %s' % type)
urllib.error.URLError: <urlopen error unknown url type: 127.0.0.1>
I'm working on debugging this now. My first impression is this is a url error, but I am not sure where exactly the url error is coming from. The error <urlopen error unknown url type: 127.0.0.1>
directed me to config.py
where I set the algod_address
.
# Credentials to connect through an algod client
algod_address = "127.0.0.1:8080"
I got the address by running cat $ALGORAND_DATA/algod.net
, but I am not sure this is the correct data to include in setting the algod_address
variable. I think this is my error for not inputting the right data to the variable.
I'm working through the last steps in the Dog Coin Tutorial. I successfully completed steps 4. Opt-In to Receive LaylaCoin
and 5. Read the LaylaCoin Balance
and am now working on 6. Transfer LaylaCoin to the Receiver Account
. Specifically, I am running the following lines of code.
## 6. Transfer LaylaCoin to the Receiver Account
from config import asset_id, creator_passphrase
from main import transfer
transfer(creator_passphrase)
I am receiving the following error.
transfer(creator_passphrase)
File "/Users/brianhaney/node/algorand-tutorials-python/create-laylacoin/main.py", line 99, in transfer
data = add_network_params(transfer_data, client)
NameError: name 'add_network_params' is not defined
The error is coming from line 99
of the main.py
file, which is following line.
data = add_network_params(transfer_data, client)
I checked the main.py file and did not see the add_network_params
function defined. I'm wondering what I am missing. One possibility is the problem is the arguments, either transfer_data
or client
. Another possibility is that I need to define the function, however I am not sure where to begin. A final possibility is that I just missed something obvious or expressly in the tutorial.
I am going to re-read the tutorial and make sure I didn't miss anything. Then, I will continue searching through the code and problem solving. Any advice or suggestions would be greatly appreciated, thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.