Skip to content
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

Error during processing #33

Open
albingroen opened this issue Jan 20, 2022 · 0 comments
Open

Error during processing #33

albingroen opened this issue Jan 20, 2022 · 0 comments

Comments

@albingroen
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant