Open h2022m opened 2 years ago
same here
Hi, @h2022m Can you please provide more details about how this error occurred? It will be great if you could share the steps to reproduce this issue.
Canvas (the library HashLips uses to load images) only supports PNG, GIF, JPEG, SVG and BMP formats. If you weren't using any of them you should convert your images.
Hi, I have the same error message. I've made sure all my layers are .png, and for testing purposes I've made them all 2000x2000 px. It goes as far as creating a single image then errors out with
"(process:20408): GLib-GIO-WARNING **: 10:52:33.366: Unexpectedly, UWP app Evernote.Evernote_10.29.7.0_x86__q4d96b2w5wcc2' (AUMId
Evernote.Evernote_q4d96b2w5wcc2!Evernote') supports 1 extensions but has no verbs
Created edition: 1, with DNA: 2be22cac7c064114ef6c324ee4ff7df3f93cfbe2"
then
"Error: Unsupported image type". Any ideas? thanks.
@williamszeto
"(process:20408): GLib-GIO-WARNING **: 10:52:33.366: Unexpectedly, UWP app Evernote.Evernote_10.29.7.0_x86__q4d96b2w5wcc2' (AUMId Evernote.Evernote_q4d96b2w5wcc2!Evernote') supports 1 extensions but has no verbs
I don't think this error is related to hashlips, it comes from evernote.
If you shared your config/layers directory I could try to track the bug down. You could make a new github repository and put your project directory in it.
its weird, that it mention Evernote. I'm about to uninstall it to see if it helps. Thanks. Here's the layers: config.zip .
@h2022m @servusas @williamszeto what did you use to make the images, it could be related to that.
Photoshop 2022. The original image was a 3D render - but I re-did the file as a clean RGB, 16-bit, 2000x2000 px, .png
Hi All,
Been trying to figure this one out for the past several hours as I too am getting this error
Created edition: 10, with DNA: XXXX
Created edition: 11, with DNA: XXXX
Created edition: 12, with DNA: XXXX
B:\XXXX\XXXX\XXXX\XXXX\Art Engine\node_modules\canvas\lib\image.js:91
SetSource.call(img, src);
^
Error: Unsupported image type
at setSource (B:\XXXX\XXXX\XXXX\XXXX\Art Engine\node_modules\canvas\lib\image.js:91:13)
at Image.set (B:\XXXX\XXXX\XXXX\XXXX\Art Engine\node_modules\canvas\lib\image.js:62:9)
at B:\XXXX\XXXX\XXXX\XXXX\Art Engine\node_modules\canvas\index.js:34:15
at new Promise (<anonymous>)
at loadImage (B:\XXXX\XXXX\XXXX\XXXX\Art Engine\node_modules\canvas\index.js:23:10)
at B:\XXXX\XXXX\XXXX\XXXX\Art Engine\src\main.js:185:27
at new Promise (<anonymous>)
at loadLayerImg B:\XXXX\XXXX\XXXX\XXXX\Art Engine\src\main.js:184:12)
at B:\XXXX\XXXX\XXXX\XXXX\Art Engine\src\main.js:368:31
at Array.forEach (<anonymous>)
Prerequisites
npm run generate
and npm run index.js
- same thing but worth the mention.Here is my tried and tested list:
On each occurrence, this error appears randomly. Due to this erratic behaviour and because I have thoroughly "cleaned the images" I'm not sure this is the appropriate error for what is actually happening.
If this error was the actual problem, it would be great if the error message would contain the attempted images - and their directories when debugLogs is set to true.
I have no idea what to do now, but I am hoping Hashlips can give this the kiss of life we all need.
Any questions, let me know!
@Xanph thank you for testing this, you could try changing line 27 in package.json
fron "canvas": "^2.8.0",
to "canvas": "^2.9.0",
. Then delete the node_modules
folder and run yarn install
/npm install
again.
If this error was the actual problem, it would be great if the error message would contain the attempted images - and their directories when debugLogs is set to true.
I've added this in my fork, you could check which files are causing the problem with that.
@bolshoytoster I just made the change to 2.9.0 nothing different there.
Will take a look at your fork, thanks for implementing that.
@Xanph if you find which files cause the problem could you send one so I can try to track the bug down.
@bolshoytoster the plot thickens...
growEditionSizeTo: 50
is set
I checked out your fork and turned on debug mode as mentioned. Using your trait types in the terminal, I went through each layer one by one, deleting the images where the value was shown. I did this until there was one image left in each layer. That way I'm no longer including images that are supposedly working in the test.
So now I have 7 layers with one image in them.
When I run the program then, sometimes it will immediately show the unsupported image type error, but then other times it will show that it has written metadata for the image and then spam "DNA exists!" until it then throws the error Unsupported image type.
Now I'll comment out each layer one by one and see what happens. For this, I'll reduce growEditionSizeTo to 25 only so the terminal does not overflow any debug messages due to DNA exists message. I'm also deleting the build folder in between each run.
Each time I get a debug log message, we'll see that as a success.
You need more layers or elements to grow your edition to 10 artworks!
Not too sure where to go from there as it's a bit erratic. But what I will do is start the trial and error process from the beginning again to see if I get any different results. If I do, I will post about them here in the next two hours.
If there is nothing from me, hopefully, this helps to narrow down the problem? Let me know if it does/doesn't 🙂
-- I will add, that I have looked at hidden files and the 'Thumbs.db' file is in some of the folders. I made sure all folders were clear from this file and the error does still happen. So no causes from that file being read.
@Xanph something else, you’ll have to manually delete the build/
directory since my fork will continue on from the previous build. I could probably add a config for this.
@Xanph something else, you’ll have to manually delete the
build/
directory since my fork will continue on from the previous build. I could probably add a config for this.
Haha yes I noticed. But factored that in
@h2022m Check all of your images make sure they are all the same type Like :PNG JPG, if all of your images shows PNG type then download Image converter and upload all of your images those if there is problem with the images it will give you an error of cant upload the image then you will know which of your images have problem and make or export them again for me I have done the mentioned method and Solved the issue. and you can use AVS.Image.Converter Hope it will be helpful.
Regards FB
@Bakhshi007 just gave this a go with AVS Image Converter, no luck on that.
I'm going to start looking again into Canvas's specific colour requirements.
@h2022m @servusas @williamszeto - have you found anything?
I'm proud to have found a temporary solution to this problem that is being caused by the canvas library being picky and also not correctly checking/handling accepted file types.
Check all images are of the supported types e.g. PNG, JPG.
Within Windows File Explorer (or your explorer) of each of your layer folders, right-click the row names to show the drop-down, then click more.
Then check the dimensions box:
You'll then see the dimensions of each PNG image like so:
Make sure each image is the same dimension as each other and the same as other images in your other layer folders. For example, the dimensions of all of my images must be 4167x4167
If they are not, use this amazing app https://www.iloveimg.com/resize-image#resize-options,pixels to resize your images.
When resizing the image, select "By pixels". Type in your required dimensions, mine are 4167x4167 and then uncheck the "Maintain Aspect Ratio" box (if it is already checked). Your's should be formatted like below.
Then replace all of your layer PNGs with the ones you have downloaded from the site. Make sure all old images are deleted before moving in the new ones just to ensure there is no contamination.
Ensure any other file type(s) like "Thumbs.db" are not in your layer folders. This is critical. If there are other files in there, it will cause Canvas to mess up again. So please ensure the folder only contains the supported image files. If you are on Windows, enable hidden files by looking at the ribbon, clicking the "view" drop-down and then selecting show>hidden items. You should then see all hidden files that should be erased.
Your images should now process!
If after each run the program still fails, go back and check your layer folders for the hidden items to ensure they are removed - they sometimes reappear. Then ensure you do not access the layer files before/during operation because this may encourage the hidden files to re-appear.
In config.js
const debugLogs = true;
const format = {
width: 1000,
height: 1000,
smoothing: false,
};
This has been tested on 4000 images.
Happy NFT generating, I really hope this helps.
@Xanph
@Xanph
Error loading image: + whatever error canvas gave + path to the image that failed
)Ah sorry, @bolshoytoster I didn't notice it when I tried.
@Xanph probably using an older version.
@bolshoytoster i made all of my images using a website called pixilart.io and then exported all of my images as .png. After running into some issues I ran them all through a png converter and image resizer to be safe, yet it has not worked at all. could my issue be related to the fact that i used pixilart.io and not adobe ps?
I solved it by activating the option to show hidden system files and deleting the file called desktop.ini that was inside in one of the layer folders.
I solved it by activating the option to show hidden system files and deleting the file called desktop.ini that was inside in one of the layer folders.
Wish i would've found this an hour ago. I only just figured out that was my issue when I looked at the file tree in my text editor, instead of looking in file explorer.
I copied my the main folder to another location and then this got fixed for me. I didn't have any size errors. It had something to do with changing windows accounts for some reason. Hopefully that helps someone if they run into this problem.
Whether or not that's -the- solution, the problem for seemed like it started immediately after I saved an image into one of the layers folders from another computer.
@breadcola you probably had a non-ascii character in the first account's name.
@breadcola you probably had a non-ascii character in the first account's name.
Maybe, one had an underscore in it. Also, I didn't see that desktop.ini comment. I didn't try that but I'm guessing that might be the real solution.
Figured out that the hidden .ini files that windows puts in was the problem. It kept trying to read it as a layer file. I removed those and have had no further issue.
load the image folders in something like WINDIRSTAT the file deletion program, its free. Windows doesnt always show hidden files like "thumbs.db" so you can DELETE them using this program, it 100% fixes the issue
Error: Unsupported image type at setSource (/Users/Usr/Documents/nft codiing/hashlips_art_engine-1.1.2_patch_v1/node_modules/canvas/lib/image.js:91:13) at Image.set (/Users/Usr/Documents/nft codiing/hashlips_art_engine-1.1.2_patch_v1/node_modules/canvas/lib/image.js:62:9) at /Users/Usr/Documents/nft codiing/hashlips_art_engine-1.1.2_patch_v1/node_modules/canvas/index.js:34:15 at new Promise () at loadImage (/Users/Usr/Documents/nft codiing/hashlips_art_engine-1.1.2_patch_v1/node_modules/canvas/index.js:23:10) at /Users/Usr/Documents/nft codiing/hashlips_art_engine-1.1.2_patch_v1/src/main.js:184:25 at new Promise () at Usr (/Users/Usr/Documents/nft codiing/hashlips_art_engine-1.1.2_patch_v1/src/main.js:183:10) at /Users/Usr/Documents/nft codiing/hashlips_art_engine-1.1.2_patch_v1/src/main.js:364:31 at Array.forEach ()