[reportlab-users] Basic BaseDocTemplate - len() of unsized object

Riaan Bekker riaan.bekker at kapabiosystems.com
Mon Jan 29 03:52:17 EST 2007



When using the doc.build() function it returns the following error:
Len() of unsized object.

As far as I can see, this error is only returned when trying to use EMPTY or
NONE objects, but I am doing the test before-hand, without any luck? If I
print the string value for the doc._flowables, it does return the reference
to each frame I added to the flowables in the following format:

[<reportlab.platypus.frames.Frame instance at 0x0194F3A0>,
<reportlab.platypus.frames.Frame instance at 0x0194F3F0>,
<reportlab.platypus.frames.Frame instance at 0x0194F418>,
<reportlab.platypus.frames.Frame instance at 0x0194F440>]

Where the values are for the doc._frameLeft, doc._frameMiddle,
doc._frameRight, doc._frameBody

The code is:

doc = coaDocTemplate("c:\\riaan.pdf")

if len(doc._flowables) <= 0 or doc._flowables == None:
print "zero"
else:
doc.build(self,doc._flowables)

Am I using the doc.build() incorrectly ?



More information about the reportlab-users mailing list