[reportlab-users] Problems installing Reportlab

Christopher Brewster cbrewster at gmail.com
Thu Aug 6 08:19:08 EDT 2009


This certainly helped a lot but I am not sure it worked entirely.
Running "sudo python setup.py install" I get:
----
################################################
#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
################################################
running install
running build
running build_py
copying src/reportlab/lib/hyphen.mashed -> build/lib.macosx-10.3-
fat-2.6/reportlab/lib
running build_clib
building '_renderPM_libart' library
building '_renderPM_gt1' library
running build_ext
running install_lib
copying build/lib.macosx-10.3-fat-2.6/reportlab/lib/hyphen.mashed -> /
Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-
packages/reportlab/lib
running install_egg_info
Removing /Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/reportlab-2.3-py2.6.egg-info
Writing /Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/site-packages/reportlab-2.3-py2.6.egg-info

########## 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 looks good.
But when I run "python setup.py tests" I get:

---

christopher-brewsters-macbook-pro-15:ReportLab_2_3 kiffer$ python
setup.py tests
..............................................................................................................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

----------------------------------------------------------------------
Ran 193 tests in 62.051s

FAILED (errors=3)


---------

What more do I need to do?
I am afraid I do not know how to read these error messages.

Thanks,
Christopher










On 6 Aug 2009, at 11:28, Robin Becker wrote:

Christopher Brewster wrote:

> On a Macbook Pro running Leopard, I have PIL and Freetype2 installed.

> When I run "python setup.py install" I get the following:

> ---

...........

> 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

Could this be a line ending conversion error. We don't make MAC
specific archives. I always assumed that people used the tar.gz files
and that being some kind of unix the mac versions just worked like
unix. the import and PIL errors are reminiscent of problem we get when
line endings are converted wrongly.
........
--
Robin Becker
_______________________________________________
reportlab-users mailing list
reportlab-users at reportlab.com
http://two.pairlist.net/mailman/listinfo/reportlab-users



More information about the reportlab-users mailing list