[reportlab-users] Bug: keepWithNext in the last flowable triggers an IndexError

Robin Becker robin at reportlab.com
Sun Jul 1 14:26:12 EDT 2007


Marius Gedminas wrote:

> I've encountered this bug with Reportlab 2.0 on Ubuntu Feisty: when the

> last item in a document is a title (e.g. imagine a blank page with

> "Notes" on top) that has keepWithNext set to True globally in the

> paragraph style, platypus throws an IndexError.

>

> I'm attaching a small example that reproduces this. Here's the

> traceback it gives me:

>

Thanks for the report Marius, but I think this and a number of related
problems have already been fixed in the latest code. Certainly this
example doesn't fail for me.


> Traceback (most recent call last):

> File "keep-with-next-error.py", line 18, in <module>

........xt(flowables)

> File "/usr/lib/python2.5/site-packages/reportlab/platypus/doctemplate.py", line 577, in handle_keepWithNext

> if not getattr(flowables[i],'locChanger',None): i += 1

> IndexError: list index out of range

>

> Marius Gedminas

--
Robin Becker


More information about the reportlab-users mailing list