0

I tried to use tktable package to create table and show my data. However, I could not make it work.

import Tkinter
import tktable

root = Tkinter.Tk()
table = tktable.Table(root, rows=10, cols=4)
table.pack(side="top", fill="both", expand=True)
root.mainloop()

I got error like:

Traceback (most recent call last):
File "C:/Users/jgou/PycharmProjects/mmt-autobench/autobench/test/test.py", 
line 520, in <module> table = Table(root, rows=10, cols=4)
File "C:\Users\jgou\PycharmProjects\mmtautobench\autobench\inst\tktable.py", 
line 135, in __init__tkinter.Widget.__init__(self, master, 'table', kw)
File "C:\Users\jgou\AppData\Local\Continuum\Anaconda2\lib\libtk\Tkinter.py", 
line 2096, in __init__(widgetName, self._w) + extra + self._options(cnf))
_tkinter.TclError: invalid command name "table"

I searched online and could you solve the issue, please suggest and help. It made me crazy. It should be very easy. Thank you very much.

Dogod
  • 283
  • 5
  • 12
  • Did you get an error _like_ what you wrote, or is that the exact error? – Bryan Oakley Dec 01 '17 at 02:26
  • It is the exact error. – Dogod Dec 01 '17 at 18:17
  • Here is the error log:Traceback (most recent call last): File "C:/Users/jgou/PycharmProjects/mmt-autobench/autobench/test/test.py", line 520, in table = tktable.Table(root, rows=10, cols=4) File "C:\Users\jgou\AppData\Local\Continuum\Anaconda2\tktable.py", line 135, in __init__ tkinter.Widget.__init__(self, master, 'table', kw) File "C:\Users\jgou\AppData\Local\Continuum\Anaconda2\lib\lib-tk\Tkinter.py", line 2096, in __init__ (widgetName, self._w) + extra + self._options(cnf)) _tkinter.TclError: invalid command name "table" – Dogod Dec 01 '17 at 18:25
  • Please don't put tracebacks in the comment section. You can [edit] your question to add additional information. – Bryan Oakley Dec 01 '17 at 20:08

0 Answers0