title: "Unsupported image object", using Tesseract
body: <p>I am building a character identifier from an image using Tesseract and Python. </p>
  
  <p>This is my code:</p>
  
  <pre class="lang-py prettyprint-override"><code>from PIL import Image
  import pytesseract as pyt
       
  image_file = 'location'
  im = Image.open(image_file)
  text = pyt.image_to_string(image_file)
  print (text)
  </code></pre>
  
  <p>I am getting the following error while executing this program:</p>
  
  <blockquote>
    <p>TypeError: Unsupported image object</p>
  </blockquote>
  
  <p>Can anyone solve this issue?</p>