DEV Community

Discussion on: NFT images generator using Python Jupyter Notebook

Collapse
 
jasonfranklin profile image
Jason Franklin • Edited

Hi Victor, is it possible to create over 50 images at once? I can successfully create 50, but when I try to do anything over 50, I get an (Error: Sesson cannot generate requests). Is this something hardcoded in one of the files being used in the jupyter notebook (extension.js) or could this possibly be due to me not having enough layers/traits? Thank you for any direction. Below is the error I'm getting.

Error happens on this code block:

Returns true if all images are unique
def all_images_unique(all_images):
seen = list()
return not any(i in seen or seen.append(i) for i in all_images)

print("Are all images unique?", all_images_unique(all_images))

Error is:

Error: Session cannot generate requests
Error: Session cannot generate requests
at w.executeCodeCell (c:\Users\theja.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:52:301310)
at w.execute (c:\Users\theja.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:52:300703)
at w.start (c:\Users\theja.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:52:296367)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async t.CellExecutionQueue.executeQueuedCells (c:\Users\theja.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:52:311160)
at async t.CellExecutionQueue.start (c:\Users\theja.vscode\extensions\ms-toolsai.jupyter-2021.8.2041215044\out\client\extension.js:52:310700)

Collapse
 
victorquanlam profile image
Victor Quan Lam

It is due to the lack of layers I reckon. You should try to add more layers and images.

Otherwise, you can try this nodejs app if you are familiar with Javascript. This code will generate more than 800,000 crypto punks without any problem. Check it out
dev.to/victorquanlam/generate-879-...

github.com/victorquanlam/cryptopun...

Collapse
 
jasonfranklin profile image
Jason Franklin

Thank you Victor. I ran the 800,000 crypto punk program and got it to work. Is there a way to lessen the number if wanted?

Thread Thread
 
victorquanlam profile image
Victor Quan Lam

You are much welcome Jason. Normally people ask for more not less haha. I think you can delete a few inputs images/ layers to reduce the outputs.

However, I will add a new feature to manipulate the number of outputs for you shortly.

Thread Thread
 
victorquanlam profile image
Victor Quan Lam

I have made changes to the code. You can now limit the outputs. Pull the latest code and run

node index.js 100