OCRmyPDF: OSError: cannot load library 'C:\Program Files\Tesseract-OCR\liblept-5.dll': error 0x7e

As in #631 I am getting the same error. Instead of 0x7f I am getting 0x7e
I am using Python 3.9.2 64 bit, Windows 10 64 bit and OCRMYPDF = 12.5.0 I cant solve the problem as solved #631 by changing leptonica.py, that is by opening zlib.dll before liblept-5.dll.

When I run the code ocrmypdf --help or ocrmypdf --version it displays same OSerror.

Does anyone know what to do? @jbarlow83

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 28 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Update: The issue is fixed by navigating to the file and changing from latest_gs = max(registry_subkeys(k), key=LooseVersion) to latest_gs = max(registry_subkeys(k), key=LooseVersion, default=0) and then remove_background is also set to False, Thanks a lot @mara004 and @jbarlow83 for the help!

I’m assuming this is related to Microsoft Store Python & closing the issue unless further information is available. We regularly test on Python for Windows.