[reportlab-users] Error generating a document in Reportlab 2.1, Python2.5

Robin Becker robin at reportlab.com
Tue Oct 9 13:30:38 EDT 2007


Mike for some reason your email came through on the users list with a reply to
the support list. Anyhow I'm replying copying the support list

Mike Steder wrote:

> Hello All,

>

> I recently upgraded from Python2.4 and Reportlab 1.2 to Python2.5 and

> Reportlab 2.1. I'm unable to generate documents due to the following

> error:

> --------------

> rml2pdf.go(rml, verbose=0, ignoreDefaults=0, outputFileName=outfile)

> File "rlextra/rml2pdf/rml2pdf.py", line 4521, in go

> File "/usr/local/lib/reportlab_2_1/reportlab/platypus/doctemplate.py",

> line 740, in build

> self.handle_flowable(flowables)

> File "/usr/local/lib/reportlab_2_1/reportlab/platypus/doctemplate.py",

> line 638, in handle_flowable

> if frame.add(f, self.canv, trySplit=self.allowSplitting):

> File "/usr/local/lib/reportlab_2_1/reportlab/platypus/frames.py", line

> 141, in _add

> w, h = flowable.wrap(aW, h)

> File "rlextra/rml2pdf/rml2pdf.py", line 2830, in wrap

> File "/usr/local/lib/reportlab_2_1/reportlab/platypus/paragraph.py",

> line 569, in wrap

> self.blPara = self.breakLines([first_line_width, later_widths])

> File "/usr/local/lib/reportlab_2_1/reportlab/platypus/paragraph.py",

> line 672, in breakLines

> nFrags= len(frags)

> TypeError: object of type 'NoneType' has no len()

> -------------------

>


Seems like frags has been set to None somehow
............
without seeing the original rml this is pretty hard to debug; this isn't
supposed to happen. Have you tried this with the very latest code?
--
Robin Becker


More information about the reportlab-users mailing list