output_type=pytesseract.Output.STRING still provides bytes object
aaravrav opened this issue · comments
Aarav commented
Changing the output_type
parameter for the image_to_string
still provides bytes object, even though pytesseract.Output.STRING
is the default
Stefan commented
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'
>>>
Aarav commented
Somehow it was a problem with my IDE? I updated it and it got rid of the problem