You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for what you are doing! Apologies in advance if I'm on drugs!
Describe the bug
Float or Datetime data causes error in drawText.
File "D:\development\common\python\test_gui\venv\lib\site-packages\tkintertable\Tables.py", line 1690, in drawText
length = len(celltxt)
TypeError: object of type 'datetime.datetime' has no len()
To Reproduce
from tkintertable import TableCanvas, TableModel
from tkinter import *
from datetime import datetime
import random
from collections import OrderedDict
Thanks for what you are doing! Apologies in advance if I'm on drugs!
Describe the bug
Float or Datetime data causes error in drawText.
File "D:\development\common\python\test_gui\venv\lib\site-packages\tkintertable\Tables.py", line 1690, in drawText
length = len(celltxt)
TypeError: object of type 'datetime.datetime' has no len()
To Reproduce
from tkintertable import TableCanvas, TableModel
from tkinter import *
from datetime import datetime
import random
from collections import OrderedDict
data = {'rec1': {'col1': 100, 'col2': 108.79, 'label': 'rec1'},
'rec2': {'col1': datetime.now(), 'col2': 321.79, 'label': 'rec3'},
'rec3': {'col1': 29.88, 'col2': 408.79, 'label': 'rec2'}
}
#from tkintertable.Testing import sampledata
#data=sampledata()
#print(data)
class TestApp(Frame):
"""Basic test frame for the table"""
app=TestApp()
app.mainloop()
System
Operating system: Windows
Python version: 3.6
Installation method (pip, git clone): pip
The text was updated successfully, but these errors were encountered: