title: PIL unable to open image via absolute path of image - IOError [Errno 2] No such file or directory
body: <p>I'm trying to open an image created via <a href="http://sorl-thumbnail.readthedocs.org/en/latest/index.html" rel="nofollow">sorl thubmnail</a> using PIL.</p>
  
  <p>Here is a part of the code</p>
  
  <pre><code>print user.image
  print user.image.url
  print user.get_images(size='500')
  print user.get_images(size='500').url
  </code></pre>
  
  <p>This outputs</p>
  
  <pre><code>images/users/DSC_0889.JPG
  /media/images/users/DSC_0889.JPG
  &lt;sorl.thumbnail.images.ImageFile object at 0x11288df10&gt;
  /media/cache/f9/ed/f9ed5e89154c42a2aff758b193618b12.jpg
  </code></pre>
  
  <p>Using PIL to open it results in the following results</p>
  
  <p><strong>Attempt 1:</strong></p>
  
  <pre><code>im = Image.open(user.image)
  </code></pre>
  
  <p>This works fine.</p>
  
  <p><strong>Attempt 2:</strong> </p>
  
  <pre><code>im = Image.open(user.get_images(size='500'))
  </code></pre>
  
  <p>This gives the error</p>
  
  <pre><code>TypeError at /scripts/user/crop-image/
  read() takes exactly 1 argument (2 given)
  
  Traceback:
  File "/Users/jaskaran/Desktop/coding/buyingiq/buyingiq/env/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
    112.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/Users/jaskaran/Desktop/coding/buyingiq/buyingiq/env/lib/python2.7/site-packages/django/contrib/auth/decorators.py" in _wrapped_view
    22.                 return view_func(request, *args, **kwargs)
  File "/Users/jaskaran/Desktop/coding/buyingiq/buyingiq/views/www/user.py" in crop_image
    114.         im = Image.open(user.get_images(size='500'))
  File "/Users/jaskaran/Desktop/coding/buyingiq/buyingiq/env/lib/python2.7/site-packages/PIL/Image.py" in open
    2097.     prefix = fp.read(16)
  </code></pre>
  
  <p><strong>Attempt 3:</strong></p>
  
  <pre><code> im = Image.open(user.get_images(size='500').url)
  </code></pre>
  
  <p>This gives the error</p>
  
  <pre><code>IOError at /scripts/user/crop-image/
  [Errno 2] No such file or directory: '/media/cache/f9/ed/f9ed5e89154c42a2aff758b193618b12.jpg'
  </code></pre>
  
  <p>If I point my browser to <code>127.0.0.1:8000/media/cache/f9/ed/f9ed5e89154c42a2aff758b193618b12.jpg</code> the image is opened, so the image exists.</p>
  
  <p>How can I use PIL to open this image?</p>