[reportlab-users] platypus/tables.py: TypeError: unsubscriptable object

Yves Forkl Y.Forkl at srz.de
Mon Mar 5 06:26:14 EST 2007


Hi,

I am using Platypus (RL Toolkit 2.0, SVN Rev. 3046) to compose a
document that has a table in it. My script, which seems having worked
fine with RL Toolkit 1.20, now crashes and provokes the following traceback:


Traceback (most recent call last):
[in my script: constructing, among other objects, a table; finally
calling doc.build(Story, onFirstPage=myLayout, onLaterPages=myLayout)]
File
"<PYTHON_INSTALLATION>lib/python2.4/site-packages/reportlab/platypus/doctemplate.py",
line 898, in build
BaseDocTemplate.build(self,flowables, canvasmaker=canvasmaker)
File
"<PYTHON_INSTALLATION>lib/python2.4/site-packages/reportlab/platypus/doctemplate.py",
line 726, in build
self.handle_flowable(flowables)
File
"<PYTHON_INSTALLATION>lib/python2.4/site-packages/reportlab/platypus/doctemplate.py",
line 643, in handle_flowable
if self.frame.add(S[0], self.canv, trySplit=0):
File
"<PYTHON_INSTALLATION>lib/python2.4/site-packages/reportlab/platypus/frames.py",
line 141, in _add
w, h = flowable.wrap(aW, h)
File
"<PYTHON_INSTALLATION>lib/python2.4/site-packages/reportlab/platypus/tables.py",
line 978, in wrap
self._calc(availWidth, availHeight)
File
"<PYTHON_INSTALLATION>lib/python2.4/site-packages/reportlab/platypus/tables.py",
line 523, in _calc
self._calc_height(availHeight,availWidth,W=W)
File
"<PYTHON_INSTALLATION>lib/python2.4/site-packages/reportlab/platypus/tables.py",
line 479, in _calc_height
w = max(colpositions[t[2]+1]-colpositions[t[0]],w)
TypeError: unsubscriptable object


I am kindly asking you to put me on the right track for chasing the
trouble spot. Does this rather look like a problem with my table set-up
or like a bug in tables.py?

Which further information about my script would you need to be able to
give me some more hints?

Yves


More information about the reportlab-users mailing list