HashLips / hashlips_art_engine

HashLips Art Engine is a tool used to create multiple different instances of artworks based on provided layers.
MIT License
7.16k stars 4.3k forks source link

baseUri not updating 5th attempt #579

Open encryptedphysarum opened 2 years ago

encryptedphysarum commented 2 years ago

Good day,

The baseUri is not updating the JSON files after inputting npm run update_info. Yesterday I deleted all my generated images and started from the start again because it wouldn't update the metadata. I wanted to ensure I didn't make any mistakes. I then re-generated another 5k batch for the 3rd time and the update_info is still not working. It shows this:

_PS C:\Users\Main\Desktop\SMETF1\hashlips_art_engine-1.1.2_patch_v1> npm run update_info

hashlips_art_engine@1.1.1 update_info node utils/update_info.js

Updated baseUri for images to ===> ipfs://QmQh1QeaXC6SURuYgbxvyfk79QzAaYccSD38iT5KJGd7tW Updated description for images to ===> The heroes are here but they ain't human! Updated name prefix for images to ===> Special Mushroom Elite Task Force PS C:\Users\Main\Desktop\SMETF1\hashlips_art_engine-1.1.2_patchv1>

but the JSON files with metadata still shows this:

_"fileurl": "ipfs://Update/5554.png",

I am using hashlips art engine 1_1_2_patch_v1

Any help would be much appreciated.

encryptedphysarum commented 2 years ago

The image is updated but shows as 'undefined' instead of 1.png for example.

"image": "ipfs://QmQh1QeaXC6SURuYgbxvyfk79QzAaYccSD38iT5KJGd7tW/undefined.png"

gtheri8 commented 2 years ago

Having the same problem

realDivineApe commented 2 years ago

I am also having the same problem. Would love some help!

gtheri8 commented 2 years ago

So the way I fixed it was reinstalling virtual studio code and node.Js, downloaded another copy of the repo, and making sure to install everything correctly. Worked right away

realDivineApe commented 2 years ago

I actually went to the HashLips discord and asked around and figured it out. For anyone who might also be having this trouble: if, by any chance, you messed around with some of the code from following the CodeStackr video (like I did) this is going to be your issue, specifically the code in the 'main.js' file around line 128-130, and made it look something similar to below...

const addMetadata = (_dna, _edition) => { let dateTime = Date.now(); let tempMetadata = { name: ${namePrefix} #${_edition}, description: description, image: ${baseUri}/${_edition}.png, attributes: attributesList, custom_fields: { dna: sha1(_dna), edition: _edition, date: dateTime, }, ...extraMetadata, };

The custom fields portion is what is causing the problem. Revert it back to the original (there will also be another section of code where you added a ".custom_fields." portion to a line that will have to be taken out) and you should be good to go!