[reportlab-users] Crash when creating vertical spans on split tables
    Casey Banner 
    casey at glooko.com
       
    Thu Nov  3 20:24:23 EDT 2011
    
    
  
Hi,
I have a crash that I can reproduce by adding a vertical SPAN to my
TableStyle which ends up either crossing over a split border, or begins at
the first row of any split other than the first.
Example: Table is split at row 5, and the SPAN is from 3 to 7.
Example: Table is split at row 5, and the SPAN is from 5 to 7.
I have made sure that the first cell in my SPAN is not an empty string.
The trace:
  File "render.py", line 179, in <module>
    doc.build([t])
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/reportlab-2.5-py2.7-macosx-10.6-x86_64.egg/reportlab/platypus/doctemplate.py",
line 1117, in build
    BaseDocTemplate.build(self,flowables, canvasmaker=canvasmaker)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/reportlab-2.5-py2.7-macosx-10.6-x86_64.egg/reportlab/platypus/doctemplate.py",
line 880, in build
    self.handle_flowable(flowables)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/reportlab-2.5-py2.7-macosx-10.6-x86_64.egg/reportlab/platypus/doctemplate.py",
line 763, in handle_flowable
    if frame.add(f, canv, trySplit=self.allowSplitting):
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/reportlab-2.5-py2.7-macosx-10.6-x86_64.egg/reportlab/platypus/frames.py",
line 159, in _add
    w, h = flowable.wrap(aW, h)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/reportlab-2.5-py2.7-macosx-10.6-x86_64.egg/reportlab/platypus/tables.py",
line 1113, in wrap
    self._calc(availWidth, availHeight)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/reportlab-2.5-py2.7-macosx-10.6-x86_64.egg/reportlab/platypus/tables.py",
line 587, in _calc
    self._calc_height(availHeight,availWidth,W=W)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/reportlab-2.5-py2.7-macosx-10.6-x86_64.egg/reportlab/platypus/tables.py",
line 553, in _calc_height
    spanFixDim(H0,H,spanCons,lim=hmax)
  File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/reportlab-2.5-py2.7-macosx-10.6-x86_64.egg/reportlab/platypus/tables.py",
line 205, in spanFixDim
    t = sum([V[x]+M.get(x,0) for x in xrange(x0,x1)])
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'
Any ideas on what would cause this?
Thanks,
Casey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20111103/36af4c55/attachment.html>
    
    
More information about the reportlab-users
mailing list