Image.open won't work after reload(Image)

Anatoliy Kats <[email protected]>
Newsgroups gmane.comp.python.image
Message-ID <[email protected]>
Hi all,

I'm not sure if this is a known bug.  If I reload(Image), then opening 
the image will not work under Python 2.6 on Ubuntu 9.04.  Here is my 
console output:

 >>> import Image
 >>> im = 
Image.open('/w/197/visionData1/bahenHallway/peopleSeq3/frame1300.ppm')
 >>> import numpy as np
 >>> im2 = np.asarray(im);
 >>> im2[[1:10], [1:10]]
  File "<stdin>", line 1
    im2[[1:10], [1:10]]
          ^
SyntaxError: invalid syntax
 >>> im2[1:10][:, 1:10]
array([[[255, 239, 216],
        [255, 243, 219],
        [255, 246, 222],
        [255, 248, 223],
        [255, 251, 225],
        [255, 252, 226],
        [255, 253, 227],
        [255, 253, 226],
        [255, 250, 223]],
...ETC...

 dtype=uint8)
 >>> reload(Image)
<module 'Image' from '/usr/lib/python2.6/dist-packages/PIL/Image.pyc'>
 >>> im = 
Image.open('/w/197/visionData1/bahenHallway/peopleSeq3/frame1300.ppm')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/dist-packages/PIL/Image.py", line 1917, in open
    raise IOError("cannot identify image file")
IOError: cannot identify image file
 >>> im3 = 
Image.open('/w/197/visionData1/bahenHallway/peopleSeq3/frame1300.ppm')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/dist-packages/PIL/Image.py", line 1917, in open
    raise IOError("cannot identify image file")
IOError: cannot identify image file
 >>>
_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.