title: Text is not being recognized correctly in an if statement
body: <p>I have an image that shows the text &quot;Cafnote&quot;. Pytesseract recognizes this, and correctly sets the variable text = &quot;Cafnote&quot;. I then check to see if text == 'Cafnote', and if it is, I want to print &quot;Cafnote Found!&quot;, but right now the if statement returns false. How would I get this if statement to return true?</p>
  <pre><code>import PIL
  from cv2 import cv2
  import pytesseract
  import time
  
  while 1 &lt; 6:
      time.sleep(1)
      screenshot = pyautogui.screenshot('screenshot.png', region=(1441,198,219,48))
      img = cv2.imread(r'screenshot.png')
      median = cv2.medianBlur(img,7)
  
      text = pytesseract.image_to_string(median)
      print(text)
  
      if text == 'Cafnote':
          print(&quot;Cafnote Found!&quot;)
  </code></pre>