-
Notifications
You must be signed in to change notification settings - Fork 721
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
image_to_boxes crashing #106
Comments
Hi @tlcyr4 , can you try the new version 4.x of Tesseract for Windows? |
Please feel free to reopen if you have problems with the new 4.x version. |
image_to_boxes is not working for me either. I have tesseract 4.0 on macOS.
Error I am getting is:
Tesseract version:
|
Hi @trehman65 - did you tested the same options directly with tesseract itself? |
You mean on command line? I am sorry I am bit of a noob. Can you tell me the command for it? |
You can patch the pytesseract.py library temporarily on line 133 and you can print the command with: print(' '.join(command)) In order to find the full pytesseract.py library file path, you need the following snippet of code: import pytesseract
print(pytesseract.__file__) |
The command that printed by patching pytesseract.py is:
This command is not working.
The error is:
The following command works but it only shows the text, not the boxes.
|
And what about the |
This is the error:
|
Thank you for the feedback. Can you report your OS version and how you installed tesseract. |
My OS version is macOS High Sierra version 10.13.2. I built tesseract from source code, by cloning the git repo. |
same issue. |
I'm able to run with tesseract itself but still get this error while running pytesseract |
Is there any further update on this issue? I am having the same problem with Tesseract 4.0. |
I have Tesseract 4.0.0.20190314 installed but I replaced the eng.traineddata with the one from here https://github.com/tesseract-ocr/tessdata/blob/master/eng.traineddata to support Tesseract v3 and I also have a barebones tessdata folder with no other files besides eng.traineddata. |
I have the same problem with Ubuntu18 and Tesseract4.0 . |
I can't reproduce this issue. I am using the sample image from this issue and it works as expected within the official python docker container. Tested with: I tested with both image_to_boxes and image_to_data @HongChow try to execute this command in your terminal in order to check if it works: tesseract /test.jpg /tmp/test_output_file batch.nochop makebox PS: It also works ok with: |
I had the same issue yesterday. I think it is more a Tesseract config issue. You maybe need to setup configs and tessconfigs folders under .../tesseract/share/data/
|
@HongChow take a look at the above ^ |
This fixed it for me. For whatever reason, my installation of tesseract 4.1.1 from conda-forge needs this argument to be set explicitly in order for the EDIT:
I found this setting by looking through the output of |
@JoelStansbury thank for reporting the workaround. |
@int3l No problem! Thanks for working on pytesseract! |
Same thing happened to me, running macOS 10.15.6 and tesseract 4.1.1. @JoelStansbury workaround worked for me, thank you. Very odd! |
@JoelStansbury I am making this issue come up alive once again since it is still there for Python 3.7.3 latest pytesseract and tesseract 5.0.0. It wasn't privileges in my case. But your workaround fixes the problem for me as well. Were you able to find what is causing this issue? |
@deduble No not really. This config option looks suspicious to me. Maybe it should be "tessedit_create_boxfile 1" as "tessedit_create_wordstrbox" doesn't seem to be a valid config option pure speculation though. I havent tested this at all |
When I run image_to_string, it works great, but when I run either image_to_boxes or image_to_data, I get an error message like this:
IOError: [Errno 2] No such file or directory: 'c:\users\tlcyr\appdata\local\temp\tess_kqx1fs_out.box'
with some random text in place of 'kqx1fs' each time I run it.
I have tesseract 3.05.01 installed on Windows.
The text was updated successfully, but these errors were encountered: