-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to create _metadata #17
Comments
@mupadi I've just made a fix for this now. You can either redownload hashlips_art_engine/src/main.js Lines 551 to 553 in 0f8ef6d
to writeMetaData(`[${metadataList.map(e => JSON.stringify(e, null, 2)).join(',')}]`); This uses code from this stackoverflow answer, and the output won't be properly formatted (bad indentation) but it should still work. |
still can not and still displays it RangeError: Invalid string length I see from the stackoverflow answer link that @bolshoytoster sent there that it says you can use JSONStream stringify. Thank you @bolshoytoster for creating the function JSONStream |
I think it's just a limitation with javascript then.
Run var JSONStream = require( "JSONStream" );
var transformStream = JSONStream.stringify();
var outputStream = fs.createWriteStream(`${buildDir}/json/_metadata.json`);
transformStream.pipe(outputStream);
metadataList.forEach(transformStream.write);
transformStream.end(); I've also added this to the repo, so you could just redownload instead. |
Summary
Unable to create _metadata
Can you combine those 1,2,3,... small json files into one _metadata.
or run the program just to create _metadata.
Because I made 200,000 more and it looks like the JSON.stringify serialization function seems to have a limit, so could you add a feature to combine those 1,2,3,... files into a file like _metadata.
Until now I haven't been able to solve the problem even using the @bolshoytoster fork.
And can you add a program for the _metadata file to be converted into an excel file like .csv or .xls.
Thank you @bolshoytoster
Basic example
RangeError: Invalid string length
at JSON.stringify ()
at startCreating (D:\hashlips_art_engine-main\src\main.js:552:22)
at D:\hashlips_art_engine-main\index.js:8:3
at Object. (D:\hashlips_art_engine-main\index.js:9:3)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32)
at Function.Module._load (node:internal/modules/cjs/loader:868:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:22:47
Motivation
In order to be able to create more artwork and overcome the limitations that JSON.stringify has in creating _metadata.
And for excel to make it easier to collect data and edit _metadata and be able to convert it back into a .json file.
The text was updated successfully, but these errors were encountered: