[BioPython] Error for running of ReportLab test on Mac OS X
Y Tu
ytu888 at hotmail.com
Fri Sep 28 15:26:11 UTC 2007
I just installed ReportLab on Mac OS X and the test with command "from reportlab.graphics import renderPDF" succeeded. However, when I run the test script (eportlab/test/test_pdfgen_general.py), I got the following error. How to fix the problem. Another question is how to run the script under the python prompt (>>>) after importing the script by "import test_pdfgen_general.py". Thank you very much.
nypivs-lee:/Applications/MacPython 2.5/reportlab/test lee$ python test_pdfgen_general.py
E
======================================================================
ERROR: Make a PDFgen document with most graphics features
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_pdfgen_general.py", line 833, in test0
run(outputfile('test_pdfgen_general.pdf'))
File "test_pdfgen_general.py", line 796, in run
c = makeDocument(filename)
File "test_pdfgen_general.py", line 725, in makeDocument
c.drawImage(tgif, 4*inch, 9.25*inch, w, h, mask='auto')
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/reportlab/pdfgen/canvas.py", line 629, in drawImage
imgObj = pdfdoc.PDFImageXObject(name, image, mask=mask)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/reportlab/pdfbase/pdfdoc.py", line 1840, in __init__
self.loadImageFromA85(src)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/reportlab/pdfbase/pdfdoc.py", line 1846, in loadImageFromA85
imagedata = map(string.strip,pdfutils.makeA85Image(source,IMG=IMG))
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/reportlab/pdfbase/pdfutils.py", line 35, in makeA85Image
raw = img.getRGBData()
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/reportlab/lib/utils.py", line 612, in getRGBData
self._data = im.tostring()
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PIL/Image.py", line 513, in tostring
self.load()
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PIL/ImageFile.py", line 180, in load
d = Image._getdecoder(self.mode, d, a, self.decoderconfig)
File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/PIL/Image.py", line 375, in _getdecoder
raise IOError("decoder %s not available" % decoder_name)
IOError: decoder jpeg not available
----------------------------------------------------------------------
Ran 1 test in 0.321s
FAILED (errors=1)
_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us
More information about the Biopython
mailing list