0

maybe someone could help me! When I run the following code

import pytesseract from pytesseract import image_to_string from PIL import Image import PIL

file = Image.open('/usr/local/Cellar/tesseract/4.1.0/share/tessdata/cap.png')
we_will = pytesseract.image_to_string(file)
print(we_will)

all that gets outputed is:

Process finished with exit code 0

which is no help. What am I doing wrong?

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352

1 Answers1

1

Sounds like we_will is the empty string. Try printing repr(we_will) to understand this idea more clearly.

IIRC, PyTesseract does this when it can't figure out what the text is inside the image. You can get the best results for a cropped image with a single-color background.

Mori Bellamy
  • 151
  • 6