[Image-SIG] crash: Image.open("lena.ppm").show()

Peter Schneider-Kamp peter@schneider-kamp.de
Tue, 13 Jun 2000 11:09:18 +0200

I am using PIL 1.1 with the current CVS version under GNU/Linux.

>>> Image.open("lena.ppm").show()
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python1.6/site-packages/PIL/Image.py", line 818,
in show
    _showxv(self, title, command)
  File "/usr/local/lib/python1.6/site-packages/PIL/Image.py", line 1151,
in _showxv
    file = self._dump(format=format)
  File "/usr/local/lib/python1.6/site-packages/PIL/Image.py", line 355,
in _dump
    file = file + "." + format
TypeError: illegal argument type for built-in operation

The reason seems to be that format == None (passed somehow
from _showxv. Note that the line numbers given vary from the
original version because I used pindent to change the indentation.

I fixed it for me by replacing the line with:
file = file + "." + self.format

Why does _showxv always pass format=None for non "nt" OSes?

Peter Schneider-Kamp          ++47-7388-7331
Herman Krags veg 51-11        mailto:peter@schneider-kamp.de
N-7050 Trondheim              http://schneider-kamp.de