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

output_type=pytesseract.Output.STRING still provides bytes object #485

Closed
aarav2you opened this issue Apr 13, 2023 · 2 comments
Closed

output_type=pytesseract.Output.STRING still provides bytes object #485

aarav2you opened this issue Apr 13, 2023 · 2 comments

Comments

@aarav2you
Copy link

Changing the output_type parameter for the image_to_string still provides bytes object, even though pytesseract.Output.STRING is the default

@stefan6419846
Copy link
Contributor

Please provide some more details for us to be able to reproduce this, as I cannot see any issue here:

>>> pytesseract.image_to_string(image)
'This is my text.\n\x0c'
>>> pytesseract.image_to_string(image, output_type=pytesseract.Output.STRING)
'This is my text.\n\x0c'
>>> pytesseract.image_to_string(image, output_type=pytesseract.Output.BYTES)
b'This is my text.\n\x0c'
>>> 

@aarav2you
Copy link
Author

Somehow it was a problem with my IDE? I updated it and it got rid of the problem

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