sirfz / tesserocr

A Python wrapper for the tesseract-ocr API
MIT License
2.02k stars 255 forks source link

Failed to init API, possibly an invalid tessdata path: ./ #320

Closed the-holsti closed 1 year ago

the-holsti commented 1 year ago

After updating to 2.6.1, I got an error message from PyTessBase, probably a bug.

Code to reproduce:

from tesserocr import PyTessBaseAPI

PyTessBaseAPI()

OS: Debian Bullseye Tesseract version: 4.1.1

zdenop commented 1 year ago

First of all: Tesseract version: 4.1.1 is old an unsupported. Use current version 5.3.2 Next: is your tessdata path valid?

sirfz commented 1 year ago

for reference about tessdata path: https://github.com/sirfz/tesserocr#tessdata

the-holsti commented 1 year ago

@zdenop @sirfz Thank you, I did not know, 4.x is not supported anymore. We will try to upgrade as soon as possible.

In 2.6.0, tesserocr automatically found the pass to tessdata, so I thought it would be a bug. I already successfully passed the tessdata path to PyTessBaseAPI, so everything worked.