[reportlab-users] Problems installing Reportlab

Christopher Brewster cbrewster at gmail.com
Wed Aug 5 17:06:59 EDT 2009


On a Macbook Pro running Leopard, I have PIL and Freetype2 installed.
When I run "python setup.py install" I get the following:
---
########## SUMMARY INFO #########
################################################
#Attempting install of _rl_accel, sgmlop & pyHnj
#extensions from '/Users/kiffer/Downloads/ReportLab_2_3/src/rl_addons/
rl_accel'
################################################
################################################
#Attempting install of _renderPM
#extensions from '/Users/kiffer/Downloads/ReportLab_2_3/src/rl_addons/
renderPM'
# installing with freetype version 21
################################################
----

This appears to be good but when I run "python setup.py tests" I get
the messages below.
Is there anything I have done wrong or what?

Thanks for your advice.

Christopher

----
christopher-brewsters-macbook-pro-15:ReportLab_2_3 kiffer$ python
setup.py tests
..........Traceback (most recent call last):
File "genuserguide.py", line 104, in <module>
main()
File "genuserguide.py", line 102, in main
run(pagesize, verbose,outDir)
File "genuserguide.py", line 53, in run
exec open_and_read(f+'.py',mode='t') in G, G
File "<string>", line 4
from tools.docco.rl_doc_utils import *
^
SyntaxError: invalid syntax
F
...................................................................................................EE
........E
........................................................................
======================================================================
ERROR: Make a PDFgen document with most graphics features
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/kiffer/Downloads/ReportLab_2_3/tests/
test_pdfgen_callback.py", line 24, in test0
makeDocument(outputfile('test_pdfgen_callback.pdf'),
pageCallBack=self.callMe)
File "/Users/kiffer/Downloads/ReportLab_2_3/tests/
test_pdfgen_general.py", line 748, in makeDocument
c.drawImage(tgif, 4*inch, 9.25*inch, w, h, mask='auto')
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/reportlab/pdfgen/canvas.py", line 690, in
drawImage
imgObj = pdfdoc.PDFImageXObject(name, image, mask=mask)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/reportlab/pdfbase/pdfdoc.py", line 2040, in
__init__
self.loadImageFromA85(src)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/reportlab/pdfbase/pdfdoc.py", line 2044, in
loadImageFromA85
imagedata = map(string.strip,pdfutils.makeA85Image(source,IMG=IMG))
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/reportlab/pdfbase/pdfutils.py", line 34, in
makeA85Image
raw = img.getRGBData()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/reportlab/lib/utils.py", line 657, in getRGBData
self._data = im.tostring()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/PIL/Image.py", line 513, in tostring
self.load()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/PIL/ImageFile.py", line 207, in load
raise IOError(error + " when reading image file")
IOError: decoding error when reading image file

======================================================================
ERROR: Make a PDFgen document with most graphics features
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/kiffer/Downloads/ReportLab_2_3/tests/
test_pdfgen_general.py", line 909, in test0
run(outputfile('test_pdfgen_general.pdf'))
File "/Users/kiffer/Downloads/ReportLab_2_3/tests/
test_pdfgen_general.py", line 872, in run
c = makeDocument(filename)
File "/Users/kiffer/Downloads/ReportLab_2_3/tests/
test_pdfgen_general.py", line 748, in makeDocument
c.drawImage(tgif, 4*inch, 9.25*inch, w, h, mask='auto')
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/reportlab/pdfgen/canvas.py", line 690, in
drawImage
imgObj = pdfdoc.PDFImageXObject(name, image, mask=mask)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/reportlab/pdfbase/pdfdoc.py", line 2040, in
__init__
self.loadImageFromA85(src)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/reportlab/pdfbase/pdfdoc.py", line 2044, in
loadImageFromA85
imagedata = map(string.strip,pdfutils.makeA85Image(source,IMG=IMG))
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/reportlab/pdfbase/pdfutils.py", line 34, in
makeA85Image
raw = img.getRGBData()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/reportlab/lib/utils.py", line 657, in getRGBData
self._data = im.tostring()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/PIL/Image.py", line 513, in tostring
self.load()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/PIL/ImageFile.py", line 207, in load
raise IOError(error + " when reading image file")
IOError: decoding error when reading image file

======================================================================
ERROR: Make a platypus document
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/kiffer/Downloads/ReportLab_2_3/tests/
test_platypus_general.py", line 567, in test0
run()
File "/Users/kiffer/Downloads/ReportLab_2_3/tests/
test_platypus_general.py", line 559, in run
doc.build(commentary,examples)
File "/Users/kiffer/Downloads/ReportLab_2_3/tests/
test_platypus_general.py", line 546, in build
self.fillFrame(flowables2)
File "/Users/kiffer/Downloads/ReportLab_2_3/tests/
test_platypus_general.py", line 537, in fillFrame
self.handle_flowable(flowables)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/reportlab/platypus/doctemplate.py", line 665,
in handle_flowable
if frame.add(f, canv, trySplit=self.allowSplitting):
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/reportlab/platypus/frames.py", line 174, in _add
flowable.drawOn(canv, self._x + self._leftExtraIndent, y, _sW=aW-w)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/reportlab/platypus/flowables.py", line 105, in
drawOn
self._drawOn(canvas)
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/reportlab/platypus/flowables.py", line 89, in
_drawOn
self.draw()#this is the bit you overload
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/reportlab/platypus/flowables.py", line 396, in
draw
mask=self._mask,
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/reportlab/pdfgen/canvas.py", line 673, in
drawImage
rawdata = image.getRGBData()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/reportlab/lib/utils.py", line 657, in getRGBData
self._data = im.tostring()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/PIL/Image.py", line 513, in tostring
self.load()
File "/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/PIL/ImageFile.py", line 207, in load
raise IOError(error + " when reading image file")
IOError: decoding error when reading image file

======================================================================
FAIL: Test if all manuals buildable from source.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/kiffer/Downloads/ReportLab_2_3/tests/
test_docs_build.py", line 31, in test0
assert os.path.isfile('reportlab-userguide.pdf'), 'genAll.py
failed to generate reportlab-userguide.pdf!'
AssertionError: genAll.py failed to generate reportlab-userguide.pdf!

----------------------------------------------------------------------
Ran 193 tests in 57.482s

FAILED (failures=1, errors=3)
christopher-brewsters-macbook-pro-15:ReportLab_2_3 kiffer$


More information about the reportlab-users mailing list