[reportlab-users] text fields or checkmarks
Robin Becker
robin at reportlab.com
Wed Jan 19 07:21:15 EST 2005
Timothy Smith wrote:
> File
> "/usr/local/lib/python2.3/site-packages/reportlab/platypus/tables.py",
> line 304, in _elementWidth
> return max(map(lambda a, b=s.fontname,
> c=s.fontsize,d=pdfmetrics.stringWidth: d(a,b,c), v))
> AttributeError: 'NoneType' object has no attribute 'fontname'
>
> can anyone sheld some light on the above error and what i should be
> looking for? i know that i do NOT have any None types in my lists which
> make up the table, a print of them is here
>
> [[26, '02/01', <PgNumeric instance - precision: 10 scale: 2 value:
> 0.00>, <PgNumeric instance - precision: 10 scale: 2 value: 53673.10>,
> <PgNumeric instance - precision: 10 scale: 2 value: 53673.10>, 0, 0, 0,
> <PgNumeric instance - precision: 10 scale: 2 value: 14417.70>, 3962,
> <PgNumeric instance - precision: 10 scale: 2 value: 0.00>, <PgNumeric
> instance - precision: 10 scale: 2 value: 13.55>, 0, 0, 0, 0], [27,
> '09/01', <PgNumeric instance - precision: 10 scale: 2 value: 0.00>,
> <PgNumeric instance - precision: 10 scale: 2 value: 32838.30>,
> <PgNumeric instance - precision: 10 scale: 2 value: 32838.30>, 0, 0, 0,
> <PgNumeric instance - precision: 10 scale: 2 value: 8041.20>, 2771,
> <PgNumeric instance - precision: 10 scale: 2 value: 0.00>, <PgNumeric
> instance - precision: 10 scale: 2 value: 11.85>, 0, 0, 0, 0]]
>
> so what is it that could possibly be producing this error?
....
the style being used seems to lack a fontname and size and I suspect that
elementWidth is being applied to something that is neither a list of flowables,
or a flowable or a string.
--
Robin Becker
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.0 - Release Date: 17/01/2005
More information about the reportlab-users
mailing list