This commit is contained in:
pythongosssss 2023-10-20 19:12:33 +01:00
parent ecd7b45d32
commit fa65943b56

View File

@ -23,8 +23,10 @@ async function setup() {
data = JSON.stringify(objectInfo, undefined, "\t"); data = JSON.stringify(objectInfo, undefined, "\t");
const outPath = resolve("./data/object_info.json")
console.log(`Writing ${Object.keys(objectInfo).length} nodes to ${outPath}`);
writeFile( writeFile(
"data/object_info.json", outPath,
data, data,
{ {
encoding: "utf8", encoding: "utf8",
@ -60,6 +62,7 @@ async function setup() {
args = ["main.py"]; args = ["main.py"];
cwd = ".."; cwd = "..";
} }
console.log(python, ...args);
child = spawn(python, [...args, "--cpu"], { cwd }); child = spawn(python, [...args, "--cpu"], { cwd });
child.on("error", (err) => { child.on("error", (err) => {
console.log(`Server error (${err})`); console.log(`Server error (${err})`);