Git Product home page Git Product logo

algorand-tutorials-python's People

Contributors

ejbaran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

algorand-tutorials-python's Issues

Overspend Error

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?

URL Open Error

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.

Transfer Error: add_network_params is not defined.

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.