question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

It would be nice, if the OCR functions would support timeouts (on py2k f.e via https://github.com/google/python-subprocess32). Forgive me if there’s a tesseract binary flag for this as I can’t find it 😦 Cheers.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

2reactions
vasadhananjaycommented, Mar 20, 2019

I’ve been battling with this issue for a while now. As I am reading lot of PDFs and tesseract processes become zombies as they couldn’t read the PDF for some reason (I’m assuming corrupted PDFs). Overtime this compounds and hogs up all the processes without doing anything.

I believe this can be fixed by using communicate(timeout=xx) at line 189.

I haven’t tested it. Please correct me if I’m wrong.

Just ran into this same problem. Can confirm that adding a timeout=XX works fine.

1reaction
int3lcommented, Mar 11, 2019

@starenka you are absolutely right, but it doesn’t seem like a very good idea to add support for the 2.7 version via third party lib that will become legacy pretty soon.

I understand the need for timeout functionality (which also involves manually killing the hanging tesseract process, since the python timeout functionality just unblocks the code execution), but maybe we should add a more elegant solution.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Contact us - Time Out
Get your business listed on Time Out New York Premium Profiles | Get Listed General Inquiries +1-646-432-3000 · hello-us@timeout.com ; Advertising/Commercial, US ...
Read more >
setTimeout() - Web APIs - MDN Web Docs
The global setTimeout() method sets a timer which executes a function or specified piece of code once the timer expires.
Read more >
$timeout - AngularJS: API
AngularJS's wrapper for window.setTimeout . The fn function is wrapped into a try/catch block and delegates any exceptions to $exceptionHandler service.
Read more >
Timeout values - Forums - IBM Support
In useragent object configuration we have a field called "timeout", ... If such an XSL connects to a service, the timeout value of...
Read more >
Transport Layer Security (TLS) connections might fail or ...
Transport Layer Security (TLS) connections might fail or timeout when ... Any third-party operating system, device or service that does not support EMS ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found