Skip to content
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

Can't directly use image_to_text for invalid path for tessdata. #334

Closed
WentaoHu opened this issue Oct 22, 2023 · 2 comments
Closed

Can't directly use image_to_text for invalid path for tessdata. #334

WentaoHu opened this issue Oct 22, 2023 · 2 comments

Comments

@WentaoHu
Copy link

WentaoHu commented Oct 22, 2023

I have the following code in 2 diff approaches, the code works perfectly if I use "PyTessBaseAPI" approach, however, if I want to switch to the simpler side with TESSDATA_PREFIX, I start to run into error that I can't figure out why.

I just wondering what's the reason behind it since both approaches are listed in the doc, I am also believe my tessdata folder is correct since one path worked (let alone I didn't do anything training, I just copy one of the default eng version).

Happy path with PyTessBaseAPI
image

Weird failure
image

@sirfz
Copy link
Owner

sirfz commented Oct 23, 2023

You can pass the path parameter to image_to_text.

@WentaoHu
Copy link
Author

Thank you for the reply, I will recommend adding this info to add to the initial readme 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants