node-tesseract-ocr icon indicating copy to clipboard operation
node-tesseract-ocr copied to clipboard

Error during processing

Open albingroen opened this issue 3 years ago • 0 comments

Code

const tesseract = require("node-tesseract-ocr");

const config = {
  lang: "swe",
  oem: 1,
  psm: 3,
};

tesseract
  .recognize(`${__dirname}/doc.png`, config)
  .then((text) => {
    console.log("Result:", text);
  })
  .catch((error) => {
    console.log(error);
  });

Output

Error: Command failed: tesseract "/Users/albingroen/Developer/demos/node-ocr-test/doc.png" stdout -l swe --oem 1 --psm 3
Error during processing.

    at ChildProcess.exithandler (child_process.js:319:12)
    at ChildProcess.emit (events.js:376:20)
    at maybeClose (internal/child_process.js:1055:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) {
  killed: false,
  code: 1,
  signal: null,
  cmd: 'tesseract "/Users/albingroen/Developer/demos/node-ocr-test/doc.png" stdout -l swe --oem 1 --psm 3'
}

Tesseract version (macOS)

tesseract 5.0.1
 leptonica-1.82.0
  libgif 5.2.1 : libjpeg 9d : libpng 1.6.37 : libtiff 4.3.0 : zlib 1.2.11 : libwebp 1.2.1 : libopenjp2 2.4.0
 Found NEON
 Found libarchive 3.5.2 zlib/1.2.11 liblzma/5.2.5 bz2lib/1.0.8 liblz4/1.9.3 libzstd/1.5.0
 Found libcurl/7.77.0 SecureTransport (LibreSSL/2.8.3) zlib/1.2.11 nghttp2/1.42.0

Am I missing something?

albingroen avatar Jan 20 '22 09:01 albingroen