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

implement skip duplicated items #19

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

levintech
Copy link

now this script generate COUNT items then remove duplicated ones. so the final generated items are less than COUNT.
I fixed this issue to generate correct number of COUNT items that are unique.

Copy link

@ykeremekinci ykeremekinci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Traceback (most recent call last):
File "D:\Google Indirilenler\generative-art-nft-master\generative-art-nft-master\nft.py", line 259, in
main()
File "D:\Google Indirilenler\generative-art-nft-master\generative-art-nft-master\nft.py", line 250, in main
rt = generate_images(edition_name, num_avatars)
File "D:\Google Indirilenler\generative-art-nft-master\generative-art-nft-master\nft.py", line 186, in generate_images
if is_dupliacted(rarity_dict, trait_sets, image_index):
File "D:\Google Indirilenler\generative-art-nft-master\generative-art-nft-master\nft.py", line 151, in is_dupliacted
if rarity_dict[CONFIG[idx]['name']][index] != trait[: -1 * len('.png')]:
TypeError: 'NoneType' object is not subscriptable

I got this error. Can you help me

@levintech
Copy link
Author

Hi, @ykeremekinci Good Day!
Please share me more details....
You can fork this repository and create new branch. Once you push your own branch to this repo, let me know it's name.
I will test your script on my side then we will find way to solve above problem.
Thanks

@ykeremekinci
Copy link

ykeremekinci commented Mar 13, 2022

https://github.com/ykeremekinci/generative-art-nft/blob/Generative-Art-Nft-problem-ykeremekinci/generative-art-nft-master%20problem.zip

This is my file. You can download here. Inside the generative-art-nft folder, there is another generative-art-nft folder. Open this in Visual Studio Code.

@levintech
Copy link
Author

Hi, @ykeremekinci Thanks for sharing your script.
I found what the issue and fixed them. I missed checking None traits mechanism on the script. I had already fixed that issue and test them on my side. You can see the updated code now. If you have any other problem, please kindly share me.
Thanks.

@ykeremekinci
Copy link

ykeremekinci commented Mar 13, 2022

Thank you for your help.

I got a new problem :(

Starting task...
\ | # | 14 Elapsed Time: 0:00:00Generated 15 images, 11 are distinct
Removing 4 images...
Saving metadata...
Task complete!
| | #

This time the code works but it deletes the same images as before and there are fewer images when there should have been 15 images. And yes, I have installed the versions of the plugins in the suggested post you added.

Here is my file : https://github.com/ykeremekinci/generative-art-nft/blob/Generative-Art-Nft-problem-ykeremekinci/generative-art-nft-problem2.rar

akhater and others added 2 commits March 14, 2022 00:57
The append in line 203 sets it to 'none' so I believe that what we shld be comparing it with

that's why the code wasn't finding any duplicates
@ykeremekinci
Copy link

Yes, it really worked this time. Thank you 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

Successfully merging this pull request may close these issues.

3 participants