title: Python Image Library: AttributeError: 'NoneType' object has no attribute XXX
body: <p>I opened a picture with PIL, but when I tried to use <code>split()</code> to split the channels I got following error:
  <code>AttributeError: 'NoneType' object has no attribute 'bands'</code> </p>
  
  <pre><code>import Image
  img = Image.open('IMG_0007.jpg')
  
  img.split()
  ---------------------------------------------------------------------------
  AttributeError                            Traceback (most recent call last)
  
  /home/blum/&lt;ipython console&gt; in &lt;module&gt;()
  
  /usr/lib/python2.6/dist-packages/PIL/Image.pyc in split(self)
     1495         "Split image into bands"
     1496 
  -&gt; 1497         if self.im.bands == 1:
     1498             ims = [self.copy()]
     1499         else:
  
  AttributeError: 'NoneType' object has no attribute 'bands'
  </code></pre>