Skip to content

Error: Error: UNKNOWN: unknown error, open '\eng.traineddata' CRASH #536

@soulus98

Description

@soulus98

Describe the bug
I'm not sure what is causing this or how to fix it, I have worker.load, initialise and loadlanguage in a try-catch, but it is ignored and just crashes.
This is the Error data:

\node_modules\tesseract.js\src\createWorker.js:173
        throw Error(data);
        ^

Error: Error: UNKNOWN: unknown error, open '\eng.traineddata'
    at ChildProcess.<anonymous> (\node_modules\tesseract.js\src\createWorker.js:173:15)
    at ChildProcess.emit (events.js:315:20)
    at emit (internal/child_process.js:903:12)
    at processTicksAndRejections (internal/process/task_queues.js:81:21)

This is where I am when it happens

{
  workerId: 'Worker-1-fa91e',
  status: 'loading language traineddata',
  progress: 0
}
{
  workerId: 'Worker-1-fa91e',
  status: 'loading language traineddata (from cache)',
  progress: 0.5
}

To Reproduce
The only thing I can think of is that I sometimes call two of these simultaneously, but it still happens with only one, just less frequently.

Expected behavior
Not a crash

Desktop (please complete the following information):

  • OS: Win10
  • Node: v14.16.0
  • Tess @2.1.4

Is there at least a way that I can handle this? So I can retry it when it fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions