[reportlab-users] troubles with an image
Robin Becker
reportlab-users@reportlab.com
Wed, 3 Mar 2004 15:59:47 +0000
In message <BAY15-F42EaI5LQQWZx0000ae7e@hotmail.com>, Ángela Villota
Gómez <angievig@hotmail.com> writes
OK I tested this with python 2.2 and no PIL image library and that's
where I get the error. You need to get hold of the Python Imaging
library for your platform and install it. It looks like you are running
Linux so I won't be able to help you straight off.
I should fix that error message though so it is more revealing.
>hi robin!
>first, thanks for help me with all my troubles.
>I'm belive that I need a library or somethin like that, because i can't run
>the paragraph example, and i find the same error, the error with the image.
>Look:
>I think, maybe it's useful for other reportlab's users!
>
>
>[angievig@lince test]$ python test_platypus_paragraphs.py
>..Warn: Imaging Library not available, unable to import bitmaps
>E
>======================================================================
>ERROR: This makes one long multi-page paragraph.
>----------------------------------------------------------------------
>Traceback (most recent call last):
> File "test_platypus_paragraphs.py", line 90, in test0
> doc.multiBuild(story)
> File "/usr/lib/python2.2/reportlab/platypus/doctemplate.py", line 702, in
>multiBuild
> self.build(tempStory, filename, canvasmaker)
> File "/usr/lib/python2.2/reportlab/platypus/doctemplate.py", line 631, in
>build
> self.handle_flowable(flowables)
> File "/usr/lib/python2.2/reportlab/platypus/doctemplate.py", line 549, in
>handle_flowable
> if self.frame.add(f, self.canv, trySplit=self.allowSplitting):
> File "/usr/lib/python2.2/reportlab/platypus/frames.py", line 120, in _add
> w, h = flowable.wrap(self._getAvailableWidth(), h)
> File "/usr/lib/python2.2/reportlab/platypus/flowables.py", line 480, in
>wrap
> wI, hI = self.I.wrap(availWidth,availHeight)
> File "/usr/lib/python2.2/reportlab/platypus/flowables.py", line 357, in
>wrap
> return (self.drawWidth, self.drawHeight)
> File "/usr/lib/python2.2/reportlab/platypus/flowables.py", line 351, in
>__getattr__
> self._setup_inner()
> File "/usr/lib/python2.2/reportlab/platypus/flowables.py", line 332, in
>_setup_inner
> (self.imageWidth, self.imageHeight) = self._img.getSize()
> File "/usr/lib/python2.2/reportlab/lib/utils.py", line 322, in getSize
> if (self._width is None or self._height is None):
>AttributeError: ImageReader instance has no attribute '_width'
>
>----------------------------------------------------------------------
>Ran 3 tests in 0.049s
>
>FAILED (errors=1)
>
>_________________________________________________________________
>MSN Amor: busca tu ˝ naranja http://latam.msn.com/amor/
>
>
--
Robin Becker