[reportlab-users] Table instance has no attribute '_rowpositions'
rptl at s.rhythm.cx
rptl at s.rhythm.cx
Mon Feb 14 22:31:43 EST 2005
Hi everyone. I'm new to reportlab - it looks pretty neat. I'm having a
problem with one of my initial experiments. I'm trying to put a simple
table onto a page with this code:
from reportlab.pdfgen import canvas
from reportlab.platypus import Table
data = [['ul','ur'],['ll','lr']]
t=Table(data)
c = canvas.Canvas("hello.pdf")
t.drawOn(c,200,100)
c.showPage()
c.save()
However, the following exception is thrown up from the guts of reportlab and
doesn't mean too much to me:
Traceback (most recent call last):
File "./pr.py", line 11, in ?
t.drawOn(c,200,100) File
"/usr/lib/python2.3/site-packages/reportlab/platypus/flowables.py",
line97, in drawOn
self._drawOn(canvas) File
"/usr/lib/python2.3/site-packages/reportlab/platypus/flowables.py",
line82, in _drawOn
self.draw()#this is the bit you overload File
"/usr/lib/python2.3/site-packages/reportlab/platypus/tables.py",
line 951, in draw for row, rowstyle, rowpos, rowheight in
map(None, self._cellvalues,
self._cellStyles, self._rowpositions[1:], self._rowHeights):
AttributeError: Table instance has no attribute '_rowpositions'
Can anyone explain what's wrong?
Thanks
More information about the reportlab-users
mailing list