-
Notifications
You must be signed in to change notification settings - Fork 3
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 extraction #25
Comments
Can you post a minimal version of the code you are using? This error appears to be caused by resources being cleared while recognition is still running, so it's not possible to answer without knowing the code that is being run. |
Yes, sure. It's happening even using your code from the nodejs example: import scribe from 'scribe.js-ocr'
const text = await scribe.extractText(['./image-native.pdf'])
await scribe.terminate()
console.log(text) I'm not absolutely sure, but in v0.5.0 it seems to happen more often than in previous versions. With certain files it happens always. Unfortunately, I cannot attach the culprit file for you, as it's confidential. Strange thing: using the scribeocr frontend, it just works without any problem. Things I've tried so far:
With the minimal example above I get this error instead: Error: TypeError: Cannot read properties of undefined (reading '0')
at Worker.<anonymous> (/home/ben/repos/scribejs/node_modules/@scribe.js/tesseract.js/src/createWorker.js:283:15)
at Worker.emit (node:events:518:28)
at MessagePort.<anonymous> (node:internal/worker:263:53)
at [nodejs.internal.kHybridDispatch] (node:internal/event_target:826:20)
at exports.emitMessage (node:internal/per_context/messageport:23:28) And yes, I've tried the recommended Any hint what I could try next? Any clue on why it is working in the browser (scribeocr) and not on the terminal? Thank you in advance. |
@bennyzen Thanks for clarifying. I was able to replicate the second error message ( I will troubleshoot and fix that error, and update #26 accordingly. However, as noted above, I doubt this is directly related to the original error message, so let me know if you can reliably replicate the original error message with a minimal example. |
Yes, you're right. While trying and re-trying, I was causing confusion and mixing different errors. I'll track the other error over there #26 Thank you for your effort. I really appreciate. |
I'm using scribe.js to batch process a large number of PDFs. The error below keeps emerging from time to time. Its appearance is pretty random and is NOT related to specific PDFs. After restarting the batch process, it processes that specific PDF just fine.
The text was updated successfully, but these errors were encountered: