[reportlab-users] AttributeError: XPreformatted instance has no attribute 'blPara'

Michael Hipp michael at redmule.com
Mon Jan 2 15:58:25 EST 2012


Just got an exception:

AttributeError: XPreformatted instance has no attribute 'blPara'
...
File "C:\Python27\Lib\site-packages\reportlab\platypus\flowables.py", line 108,
in drawOn
self._drawOn(canvas)
File "C:\Python27\Lib\site-packages\reportlab\platypus\flowables.py", line 89,
in _drawOn
self.draw()#this is the bit you overload
File "C:\Python27\Lib\site-packages\reportlab\platypus\paragraph.py", line 992,
in draw
self.drawPara(self.debug)
File "C:\Python27\Lib\site-packages\reportlab\platypus\paragraph.py", line
1295, in drawPara
blPara = self.blPara

Here's a stub of my code that kicked it off:

hdr = "%s\nMemo: %s\nSale date: %s" % \
(self.seller, self.memo, self.sale_date.strftime('%Y-%m-%d'))
ch = XPreformatted(hdr, self.style)
ch.drawOn(canvas, 0.75*inch, ph-1.00*inch)

ReportLab version 2.5.

Thanks,
Michael Hipp


More information about the reportlab-users mailing list