[Image-SIG] Broken PIL

Larry Bates lbates at syscononline.com
Tue Jun 10 12:29:12 EDT 2003


All of the sudden I'm getting an odd error/traceback when I try to use
PIL.  I recently downloaded and installed 1.1.4a3 (Windows installer
version).  I did patch this with the PcxImagePlugin that Fredrick
sent me last week.

Below is a sample program and traceback that I'm getting.  It doesn't
seem to matter if I change the output format to JPG (e.g. I get the
same traceback).

Thanks in advance for any assistance.

Regards, Larry


import Image
import PcxImagePlugin

infilename=r"c:\Windows\Temp\J0001579.001"
outfilename=r"c:\Windows\Temp\J0001579.PDF"
im=Image.open(infilename)
im.save(outfilename, "PDF")

Traceback (most recent call last):
  File
"C:\Python22\Lib\site-packages\Pythonwin\pywin\framework\scriptutils.py",
line 301, in RunScript
    exec codeObject in __main__.__dict__
  File "F:\Swami\Projects\AFR\TestPDF.py", line 26, in ?
    im.save(outfilename, "PDF")
  File "C:\Python22\Lib\site-packages\PIL\Image.py", line 1084, in save
    self.load()
  File "C:\Python22\Lib\site-packages\PIL\ImageFile.py", line 156, in load
    d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
  File "C:\Python22\Lib\site-packages\PIL\Image.py", line 271, in
_getdecoder
    return apply(decoder, (mode,) + args + extra)
TypeError: function takes exactly 2 arguments (3 given)
>>> Can not watch file F:\Swami\Projects\AFR for changes - Incorrect
function.
Traceback (most recent call last):
  File
"C:\Python22\Lib\site-packages\Pythonwin\pywin\framework\scriptutils.py",
line 301, in RunScript
    exec codeObject in __main__.__dict__
  File "F:\Swami\Projects\AFR\test.py", line 7, in ?
    im.save(outfilename, "PDF")
  File "C:\Python22\Lib\site-packages\PIL\Image.py", line 1084, in save
    self.load()
  File "C:\Python22\Lib\site-packages\PIL\ImageFile.py", line 156, in load
    d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
  File "C:\Python22\Lib\site-packages\PIL\Image.py", line 271, in
_getdecoder
    return apply(decoder, (mode,) + args + extra)
TypeError: function takes exactly 2 arguments (3 given)




More information about the Image-SIG mailing list