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

Error: EINVAL #670

Open dpd1223 opened 2 years ago

dpd1223 commented 2 years ago

C:\Users\HP\Downloads\Compressed\create-10k-nft-collection-1.1.0\create-10k-nft-collection-1.1.0>npm run generate

10k-collection-video@1.1.0 generate node index.js

(node:18748) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead (Use node --trace-deprecation ... to show where the warning was created) C:\Users\HP\Downloads\Compressed\create-10k-nft-collection-1.1.0\create-10k-nft-collection-1.1.0\node_modules\canvas\lib\image.js:91 SetSource.call(img, src); ^

Error: EINVAL, Invalid argument 'C:\Users\HP\Downloads\Compressed\create-10k-nft-collection-1.1.0\create-10k-nft-collection-1.1.0/layers/Background/0007s0001White.png ' at setSource (C:\Users\HP\Downloads\Compressed\create-10k-nft-collection-1.1.0\create-10k-nft-collection-1.1.0\node_modules\canvas\lib\image.js:91:13) at Image.set (C:\Users\HP\Downloads\Compressed\create-10k-nft-collection-1.1.0\create-10k-nft-collection-1.1.0\node_modules\canvas\lib\image.js:62:9) at C:\Users\HP\Downloads\Compressed\create-10k-nft-collection-1.1.0\create-10k-nft-collection-1.1.0\node_modules\canvas\index.js:34:15 at new Promise () at loadImage (C:\Users\HP\Downloads\Compressed\create-10k-nft-collection-1.1.0\create-10k-nft-collection-1.1.0\node_modules\canvas\index.js:23:10) at C:\Users\HP\Downloads\Compressed\create-10k-nft-collection-1.1.0\create-10k-nft-collection-1.1.0\src\main.js:183:25 at new Promise () at loadLayerImg (C:\Users\HP\Downloads\Compressed\create-10k-nft-collection-1.1.0\create-10k-nft-collection-1.1.0\src\main.js:182:10) at C:\Users\HP\Downloads\Compressed\create-10k-nft-collection-1.1.0\create-10k-nft-collection-1.1.0\src\main.js:364:31 at Array.forEach () { errno: 22, code: 'EINVAL', path: 'C:\Users\HP\Downloads\Compressed\create-10k-nft-collection-1.1.0\create-10k-nft-collection-1.1.0/layers/Background/0007s0001White.png\n' + ' ', syscall: 'fopen' }

Can Someone Help me out Why this error is coming ??

bolshoytoster commented 2 years ago

@dpd1223 it looks like layers/Background/0007s0001White.png has a newline in it. god knows how, I'll have look at any issues, make sure your filenames don't have newlines in them.

dpd1223 commented 2 years ago

Please tell me the newline which is present in it. That path was not written by me. I also Do not know Coding.🥺

bolshoytoster commented 2 years ago

@dpd1223 the file's name has a charachter that shouldn't be in it, rename the files and it should go away.

dpd1223 commented 2 years ago

I renamed the file and removed all symbols...but still it is showing the same error

This is the code:

PS C:\Users\HP\OneDrive\Desktop\create10nftcollection110> npm run generate

10k-collection-video@1.1.0 generate node index.js

(node:10588) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead (Use node --trace-deprecation ... to show where the warning was created) C:\Users\HP\OneDrive\Desktop\create10nftcollection110\node_modules\canvas\lib\image.js:91 SetSource.call(img, src); ^

Error: EINVAL, Invalid argument 'C:\Users\HP\OneDrive\Desktop\create10nftcollection110/layers/Background/White.png ' at setSource (C:\Users\HP\OneDrive\Desktop\create10nftcollection110\node_modules\canvas\lib\image.js:91:13) at Image.set (C:\Users\HP\OneDrive\Desktop\create10nftcollection110\node_modules\canvas\lib\image.js:62:9) at C:\Users\HP\OneDrive\Desktop\create10nftcollection110\node_modules\canvas\index.js:34:15 at new Promise () at loadImage (C:\Users\HP\OneDrive\Desktop\create10nftcollection110\node_modules\canvas\index.js:23:10) at C:\Users\HP\OneDrive\Desktop\create10nftcollection110\src\main.js:183:25 at new Promise () at loadLayerImg (C:\Users\HP\OneDrive\Desktop\create10nftcollection110\src\main.js:182:10) at C:\Users\HP\OneDrive\Desktop\create10nftcollection110\src\main.js:364:31 at Array.forEach () { errno: 22, code: 'EINVAL', path: 'C:\Users\HP\OneDrive\Desktop\create10nftcollection110/layers/Background/White.png\n' + ' ', syscall: 'fopen' }

bolshoytoster commented 2 years ago

@dpd1223 you need to do it for all of the images with newlines in them. It's complaining about layers/Background/White.png now.