[reportlab-users] Problems installing Reportlab

Christopher Brewster cbrewster at gmail.com
Thu Aug 6 11:47:01 EDT 2009


I ran the test as su and got the same result.
Based on your message I thought there might be a problem with PIL and
so I reinstalled it and ran the tests it has to see if it works.
That went fine

When I returned to reportlab, I still have the same problems running
the test: FAILED(errors=3:

Any thoughts?

Thank you for your help so far.

Christopher

----

christopher-brewsters-macbook-pro-15:ReportLab_2_3 kiffer$ sudo 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 69.220s

FAILED (errors=3)


----


On 6 Aug 2009, at 14:49, Robin Becker wrote:

Christopher Brewster wrote:

> This certainly helped a lot but I am not sure it worked entirely.

> Running "sudo python setup.py install" I get:

.......
the errors you're reporting appear to be related to PIL. The error
related to tgif may be occurring because we are trying to test that a
jpg that is copied to a file ending in '.gif' is actually recognised
properly so we need to carry out the copy.

Doing the install as su probably requires that you run the tests as su.
--
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