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.19k stars 4.3k forks source link

Cannot read property 'path' of undefined #124

Closed abhiyankhanal closed 2 years ago

abhiyankhanal commented 3 years ago

(node:5588) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'path' of undefined at D:\fiverr\nft tool\hashlips_art_engine-main\src\main.js:145:61 at new Promise () at loadLayerImg (D:\fiverr\nft tool\hashlips_art_engine-main\src\main.js:144:10) at D:\fiverr\nft tool\hashlips_art_engine-main\src\main.js:282:31 at Array.forEach () at startCreating (D:\fiverr\nft tool\hashlips_art_engine-main\src\main.js:281:17) at D:\fiverr\nft tool\hashlips_art_engine-main\index.js:13:3 at Object. (D:\fiverr\nft tool\hashlips_art_engine-main\index.js:14:3) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) (Use node --trace-warnings ... to show where the warning was created) (node:5588) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:5588) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. (node:5588) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'path' of undefined at D:\fiverr\nft tool\hashlips_art_engine-main\src\main.js:145:61 at new Promise () at loadLayerImg (D:\fiverr\nft tool\hashlips_art_engine-main\src\main.js:144:10) at D:\fiverr\nft tool\hashlips_art_engine-main\src\main.js:282:31 at Array.forEach () at startCreating (D:\fiverr\nft tool\hashlips_art_engine-main\src\main.js:281:17) at D:\fiverr\nft tool\hashlips_art_engine-main\index.js:13:3 at Object. (D:\fiverr\nft tool\hashlips_art_engine-main\index.js:14:3) at Module._compile (internal/modules/cjs/loader.js:1063:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10) (node:5588) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)

Judd515 commented 3 years ago

Make sure there are no dashes (-) in your file names. I discovered this recently.

paco2773 commented 3 years ago

Also make sure that you have defined the rarity number at the end of the image name, example ''imagename#44.png'' for each image in the layer folder.

nshCore commented 3 years ago

I just came across this issue,

you probably have duplicate files named in a similar fashion

green-layerx#10.png green-layery#10.png green-layerz#10.png

Its not documented in the readme but this naming convention of pre-appening a word with

-

is used as the DNA_DELIMITER value which cant be duplicated, if you didn't intend to signify a dns trait just rename your files from

-

with

_
itxshakil commented 3 years ago

Make sure there are no dashes (-) in your file names. It fixes the error.

But strange part is, it was working with having - in file name, and recently I rearranged the layer and it is showing error.

Hyphen(-) in filename . working with some layer No Hyphen(-) in filename . working with any error.

corbybender commented 3 years ago

I ran into this issue this morning and after reading the above suggestions, I found that only 1 image in all of my layer files had a hyphen in the name. Any time my generator would hit that particular file, it would crash. I found the image searching each layer with star-star.png ( *-*.png) Once found, I renamed the file so there was no hyphen and now it generates hundreds with no failures. Old File Name that caused the problem: "Duck-feet#20.png" New FIle Name that now works: "Duckfeet#20.png

FloBorg commented 2 years ago

Make sure there are no dashes (-) in your file names. I discovered this recently.

Thank you!!!! :) took me forever to figure it out (note: it works without a rarity number)

ismaelTHEcyclop commented 2 years ago

Make sure there are no dashes (-) in your file names. I discovered this recently.

God bless you! Thanks man!!