Python Image Lib Problems
Mark Conway Wirt
mark at intrepid.net
Thu Dec 16 18:17:01 EST 1999
I've recently build the Python Imaging Library (PIL) and installed it,
but I'm having problems actually getting it to work. The examples
from the documentation -- even the simple ones -- produce copious
errors. For example:
>>> import Image
>>> im = Image.open("lena.ppm")
>>> im.show()
Traceback (innermost last):
File "<stdin>", line 1, in ?
File "/usr/local/lib/python1.5/site-packages/PIL/Image.py", line 694, in
show _showxv(self, title, command)
File "/usr/local/lib/python1.5/site-packages/PIL/Image.py", line 974, in
_showxv
file = self._dump(format=format)
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
..or...
>>> import Image, ImageDraw
>>> im = Image.open("lena.ppm")
>>> draw = ImageDraw.Draw(im)
>>> draw.line((0,0), im.size, fill=128)
Traceback (innermost last):
File "<stdin>", line 1, in ?
TypeError: keyword parameter redefined
>>>
Am I missing something obvious? I'm new to python programming, and
finding these errors a bit confusing.
Thanks in advance. I'm using 1.5.2 on a FreeBSD 3 box, if that's
important.
--Mark
More information about the Python-list
mailing list