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

Getting List index out of range error. #6

Closed
stocktonellis opened this issue Nov 2, 2021 · 6 comments
Closed

Getting List index out of range error. #6

stocktonellis opened this issue Nov 2, 2021 · 6 comments

Comments

@stocktonellis
Copy link

When I try to run the program with my attributes, I keep getting this error: Not sure why? I did add more traits and values than the original. Any ideas?

% python3 index.py

Traceback (most recent call last):
File "/Users/NAME/Desktop/nft-generator/index.py", line 83, in
generate_unique_images(8888, {
File "/Users/NAME/Desktop/nft-generator/index.py", line 28, in generate_unique_images
trait_files[trait["name"]][key] = trait["filename"][x];
IndexError: list index out of range

@Jon-Becker
Copy link
Owner

Please upload your configuration

@Jon-Becker
Copy link
Owner

Jon-Becker commented Nov 2, 2021

Looks like the PDF cuts it off.

Please zip your project and email it to me, so I can debug it. Thanks!

@stocktonellis
Copy link
Author

Will do later tonight.

@Jon-Becker
Copy link
Owner

Sounds good, thank you!

@Jon-Becker
Copy link
Owner

Jon-Becker commented Nov 3, 2021

{
      "name": "Mouth",
      "values": ["Closed", "Frown", "Golden-Teeth", "Grumpy", "Smile", "Snorkle", "Tounge-Out", "Mouth-none"],
      "trait_path": "./trait-layers/Mouth",
      "filename": ["blue", "orange", "purple", "red", "yellow"],
      "weights": [10,15,4,3.9,20,.1,14,33]
    },

Lines 120-126. Looks like the Values don't match the filenames, which would cause the error you showed.

@stocktonellis
Copy link
Author

Oh my goodness. I'm an idiot. Thanks so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants