tksheet icon indicating copy to clipboard operation
tksheet copied to clipboard

Potential bug on the "total_rows" function

Open r-jaoui opened this issue 3 years ago • 0 comments

In the function "total_rows", I get this error :

text = "\n".join(["j^|" for lines in range(n)]) if n > 1 else "j^|",
TypeError: '>' not supported between instances of 'tuple' and 'int'

I believe the error is on line 912 of the _tksheet.py module. Checking the syntax in the definition of the default_rh field (on module _tksheet_main_table.py line 2830) I found this fix (that seems to work) :

Replace line 912 of the _tksheet.py module with the following :

height = self.MT.GetLinesHeight(int(self.MT.default_rh[0]))

instead of :

height = self.MT.GetLinesHeight(self.MT.default_rh)

Thanks !

r-jaoui avatar Aug 19 '22 12:08 r-jaoui