PIL: problem with im.show()

Chad Netzer chad at vision.arc.nasa.gov
Wed Aug 25 17:40:12 EDT 1999


Tom Kinter wrote:

> system configuration
>   Sun Solaris-2.6
>   python-1.5.2
>   PIL-1.0
>
>
>   File "/usr/local/lib/python1.5/site-packages/PIL/Image.py", line 311, in _dump
>     file = file + "." + format
> TypeError: illegal argument type for built-in operation
> >>>
>

I had the same problem on a Linux box when I was creating an SRPM for Imaging 1.0.
I created a patch to fix it, and sent that to F. Lundh (no response yet).

In any case, the following patch fixed it for me:

--- PIL/Image.py.orig   Mon Aug  2 15:39:56 1999
+++ PIL/Image.py        Sun Aug 15 14:30:28 1999
@@ -961,7 +961,7 @@
        if not command:
            command = "start"
     else:
-       format = None
+       format = "PPM"
        if not command:
            command = "xv"
            if title:

In other words, on Unix, the default format string defaults to None.  Change it
to a valid extension string (if "PPM" doesn't work for your viewer, try "TIF"
or "BMP" or "JPG" or whatever)

Chad
chad at vision.arc.nasa.gov






More information about the Python-list mailing list