[reportlab-users] Reportlab: Minor bug in platypus/tables.py

David Hughes reportlab-users@reportlab.com
Mon, 7 Jul 2003 16:01 +0100 (BST)


If anyone's interested, there is a small bug in the code for the Table 
class which produces a misleading error message. Around line 142 there are 
some integrity checks on the row and column data supplied to the table 
and, if any fail, a ValueError is raised, with an error message. Each 
message tries to print self.identity() which uses self._cellvalues. But 
the latter isn't defined until after the checks are complete. So the error 
message you end up with, is - AttributeError: Table instance has no 
attribute '_cellvalues'

Regards,

David Hughes
Forestfield Software Ltd
www.forestfield.co.uk