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

Riaan Bekker riaan.bekker at kapabiosystems.com
Tue Jan 30 04:03:28 EST 2007



I just removed the "self" variable from the doc.build() function and the
null error went away. Why does the function prototype indicate a SELF if it
is not to be used ? Am I totally on the wrong track ?

Is this list still active ?

___________________________________________________________________

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 ?

_______________________________________________
reportlab-users mailing list
reportlab-users at reportlab.com
http://two.pairlist.net/mailman/listinfo/reportlab-users



More information about the reportlab-users mailing list