Public bug reported:
Binary package hint: python-imaging
>>> import io, PIL.Image
>>> img = PIL.Image.new("RGB",(10,10))
>>> stream = io.BytesIO()
>>> img.save(stream,"PPM")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/dist-packages/PIL/Image.py", line 1439, in save
save_handler(self, fp, filename)
File "/usr/lib/python2.6/dist-packages/PIL/PpmImagePlugin.py", line 118, in
_save
ImageFile._save(im, fp, [("raw", (0,0)+im.size, 0, (rawmode, 0, 1))])
File "/usr/lib/python2.6/dist-packages/PIL/ImageFile.py", line 476, in _save
fh = fp.fileno()
File "/usr/lib/python2.6/io.py", line 480, in fileno
self._unsupported("fileno")
File "/usr/lib/python2.6/io.py", line 333, in _unsupported
(self.__class__.__name__, name))
io.UnsupportedOperation: BytesIO.fileno() not supported
This is due to line 478 in ImageFile.py, where they rely on an
AttributeError to be raised instead of io.UnsupportedOperation.
** Affects: python-imaging (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/718852
Title:
PIL: write to file-compatible object fails
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs