tkintertable icon indicating copy to clipboard operation
tkintertable copied to clipboard

Bug in `TableModel.deleteColumns()`

Open demberto opened this issue 4 years ago • 0 comments

In TableModels.py:

def deleteColumns(self, cols=None):
    """Remove all cols or list provided"""
    if cols == None:
        cols = self.columnNames
    if self.getColumnCount() == 0:
        return
    for col in cols:
        self.deleteColumn(col)
    return

Righly so TableCanvas.model.deleteColumns(), cause this exception:

TypeError: list indices must be integers or slices, not str

Also I get warnings like these, when I initialise TableCanvas

Did not find preferences!!!
could not save
could not save

I believe you should use the Python logging module, so its easier for others to find the source of these messages.

demberto avatar Oct 08 '21 10:10 demberto