rvegajr / image-ocr-renamer

Node JS app that will loop through a directory of images, ocr sections and use this text to rename the file
GNU General Public License v3.0
8 stars 3 forks source link

JS error at run #2

Open pphenric opened 3 months ago

pphenric commented 3 months ago

When I run the app.js with node, I get the following error. I console logged the 'value' and it's undefined

PS C:\My Programs\image-ocr-renamer-master> node app.js info: image-ocr-renamer 0.1.0


info: InputPath=C:\My Programs\image-ocr-renamer-master\data\input\ info: OutputPath=C:\My Programs\image-ocr-renamer-master\data\output\ info: ReprocessFiles=false C:\My Programs\image-ocr-renamer-master\data\input\asdScreenshot 2024-05-29 142749__5gZi.jpeg undefined C:\My Programs\image-ocr-renamer-master\ocrutils.js:52 value = value.split('x')[0] * 1; ^

TypeError: Cannot read properties of undefined (reading 'split') at gm. (C:\My Programs\image-ocr-renamer-master\ocrutils.js:52:35) at gm.emit (node:events:520:28) at gm. (C:\My Programs\image-ocr-renamer-master\node_modules\gm\lib\getters.js:61:18) at gm.emit (node:events:520:28) at gm. (C:\My Programs\image-ocr-renamer-master\node_modules\gm\lib\getters.js:142:12) at cb (C:\My Programs\image-ocr-renamer-master\node_modules\gm\lib\command.js:339:16) at ChildProcess.onExit (C:\My Programs\image-ocr-renamer-master\node_modules\gm\lib\command.js:322:9) at ChildProcess.emit (node:events:520:28) at cp.emit (C:\My Programs\image-ocr-renamer-master\node_modules\cross-spawn\lib\enoent.js:40:29) at maybeClose (node:internal/child_process:1105:16) at ChildProcess._handle.onexit (node:internal/child_process:305:5)