[reportlab-users] Crash when generating large PDF (100+ pages)

Jens Ådne Rydland jensadne at pvv.ntnu.no
Wed Jun 8 07:17:44 EDT 2011


Hi,

I recently got a strange crash deep down in reportlab.lib.xmllib,
traceback is:

File "/www/sites/[domain-name-removed]/views/pdfexport.py", line 658, in make_fa_pdf
qdata.append([Paragraph(u"<b>%s</b>" % qa.question, styleN),\

File "/usr/lib64/python2.4/site-packages/reportlab/platypus/paragraph.py", line 798, in __init__
self._setup(text, style, bulletText, frags, cleanBlockQuotedText)

File "/usr/lib64/python2.4/site-packages/reportlab/platypus/paragraph.py", line 813, in _setup
style, frags, bulletTextFrags = _parser.parse(text,style)

File "/usr/lib64/python2.4/site-packages/reportlab/platypus/paraparser.py", line 881, in parse
self.close() # force parsing to complete

File "/usr/lib64/python2.4/site-packages/reportlab/lib/xmllib.py", line 521, in close
self.parser.close()

AttributeError: 'NoneType' object has no attribute 'close'


Unfortunately I wasn't the one who caused the crash, the traceback came
from an automated email from Django, and I've been unable to reproduce
the error, so I'm afraid I can't provide detailed information regarding
what is being sent to Paragraph() in the first place. So I'm just hoping
that perhaps someone has an idea about why self.parser has been set to
None.

Also, seeing as this crash happened with Reportlab 2.3 is it perhaps
possible that upgrading to Reportlab 2.5 could fix the problem?

Really sorry I can't provide more detailed information, I wish I had a
proper traceback.


--
Jens Ådne Rydland


More information about the reportlab-users mailing list