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

Invalid syntax in index.py file #20

Closed
nickgag626 opened this issue Jan 3, 2022 · 5 comments
Closed

Invalid syntax in index.py file #20

nickgag626 opened this issue Jan 3, 2022 · 5 comments
Labels
invalid This doesn't seem right issue Something that could be fixed.

Comments

@nickgag626
Copy link

Syntax errors detected :

Line 67:
layers[index] = Image.open(f'{config["layers"][index]["trait_path"]}/{trait_files[attr][item[attr]]}.png').convert('RGBA')
^
SyntaxError: invalid syntax

Any idea how to resolve? Thanks

@Jon-Becker
Copy link
Owner

Did you edit the main index.py file? What version of python are you running?

Please send me your code via email at jonathan@jbecker.dev so I can debug it for you.

@nickgag626
Copy link
Author

Thanks! Sending over now.

@Jon-Becker
Copy link
Owner

Jon-Becker commented Jan 3, 2022

Code fixed, you were missing a closing bracket on line 118.

generate_unique_images(159, {
  "layers": [
    {
      "name": "Background",
      "values": ["Gen 3"],
      "trait_path": "./trait-layers/Background",
      "filename": ["Gen 3"],
      "weights": [100]
    },
    {
      "name": "Skin",
      "values": ["Black and White", "Black", "Brown", "Cosmic", "Glitter", "Gold", "Gray", "Leopard", "Monster", "White", "Zebra"],
      "trait_path": "./trait-layers/Skin",
      "filename": ["Black and White.png", "Black.png", "Brown.png", "Cosmic.png", "Glitter.png", "Gold.png", "Gray.png", "Leopard.png", "Monster.png", "White.png", "Zebra.png"],
      "weights": [15.7, 14.4, 12.5, 18.2, 7.5, 5.6, 17, 2.5, 3.7, 1.9, 1]
    },
  ],

  "baseURI": ".",
  "name": "NFT #",
  "description": "This is a description for this NFT series."
})

Feel free to close this if you don't need more help. Thank you!

@Jon-Becker Jon-Becker added invalid This doesn't seem right issue Something that could be fixed. labels Jan 3, 2022
@Jon-Becker
Copy link
Owner

What python version? I noticed a file name with spaces in it. Does removing the spaces fix it?

@stoplion
Copy link

Getting the same error. Is there a specific Python version needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right issue Something that could be fixed.
Projects
None yet
Development

No branches or pull requests

3 participants