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

Add debug logging for CLI arguments #483

Merged
merged 1 commit into from
Apr 8, 2023
Merged

Add debug logging for CLI arguments #483

merged 1 commit into from
Apr 8, 2023

Conversation

stefan6419846
Copy link
Contributor

This change adds debug logging to see which CLI arguments pytesseract passes to Tesseract itself. The goal is to simplify debugging reported issues, especially as most of them turn out to be related to plain Tesseract anyway, fixing the first part of #456.

Example usage

import pytesseract
import logging

logging.basicConfig(level=logging.WARNING)
logging.getLogger('pytesseract').setLevel(logging.DEBUG)

image = '/home/stefan/Desktop/file.png'
print(pytesseract.image_to_string(image))

Example output

DEBUG:pytesseract:['tesseract', '/home/stefan/Desktop/file.png', '/tmp/tess_0kncj5u3', 'txt']

This is my text.

@bozhodimitrov bozhodimitrov merged commit 1ec07b1 into madmaze:master Apr 8, 2023
4 checks passed
@bozhodimitrov
Copy link
Collaborator

bozhodimitrov commented Apr 8, 2023

PS: This will require a new release. I will try to create it whenever I have some time.
Thanks for your time for improving and helping with the project.

@stefan6419846 stefan6419846 deleted the patch-1 branch April 9, 2023 05:58
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

Successfully merging this pull request may close these issues.

None yet

2 participants