title: Error in opening image file in PIL
body: <p>I am trying to execute the following code</p>
  
  <pre><code>from pytesser import *
  import Image
  
  i="C:/Documents and Settings/Administrator/Desktop/attachments/R1PNDTCB.jpg"
  print i
  im = Image.open(i.strip())
  text = image_to_string(im)
  print text
  </code></pre>
  
  <p>I get the following error</p>
  
  <pre><code>C:/Documents and Settings/Administrator/Desktop/attachments/R1PNDTCB.jpg
  Traceback (most recent call last):
    File "C:\Python27\Lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 322, in RunScript
      debugger.run(codeObject, __main__.__dict__, start_stepping=0)
    File "C:\Python27\Lib\site-packages\Pythonwin\pywin\debugger\__init__.py", line 60, in run
      _GetCurrentDebugger().run(cmd, globals,locals, start_stepping)
    File "C:\Python27\Lib\site-packages\Pythonwin\pywin\debugger\debugger.py", line 655, in run
      exec cmd in globals, locals
    File "C:\Documents and Settings\Administrator\Desktop\attachments\ocr.py", line 1, in &lt;module&gt;
      from pytesser import *
    File "C:\Python27\lib\site-packages\PIL\Image.py", line 1952, in open
      fp = __builtin__.open(fp, "rb")
  IOError: [Errno 2] No such file or directory: 'C:/Documents and Settings/Administrator/Desktop/attachments/R1PNDTCB.jpg'
  </code></pre>
  
  <p>Can someone please explain what I am doing wrong here.</p>
  
  <p>Renamed the image file.Shifted the python file and the images to a new folder. Shifted the folder to E drive
  Now the code is as follows:</p>
  
  <pre><code>from pytesser import *
  import Image
  import os
  
  i=os.path.join("E:\\","ocr","a.jpg")
  print i
  im = Image.open(i.strip())
  text = image_to_string(im)
  print text
  </code></pre>
  
  <p>Now the error is as follows:</p>
  
  <pre><code>E:\ocr\a.jpg
  Traceback (most recent call last):
    File "or.py", line 8, in &lt;module&gt;
      text = image_to_string(im)
    File "C:\Python27\lib\pytesser.py", line 31, in image_to_string
      call_tesseract(scratch_image_name, scratch_text_name_root)
    File "C:\Python27\lib\pytesser.py", line 21, in call_tesseract
      proc = subprocess.Popen(args)
    File "C:\Python27\lib\subprocess.py", line 679, in __init__
      errread, errwrite)
    File "C:\Python27\lib\subprocess.py", line 893, in _execute_child
      startupinfo)
  WindowsError: [Error 2] The system cannot find the file specified
  </code></pre>