tktable icon indicating copy to clipboard operation
tktable copied to clipboard

_tkinter.TclError: invalid command name "table"

Open LyeeH opened this issue 7 years ago • 4 comments

Python 3.6.4 Tcl/tk 8.6.6 System: Linux(Fedora) or Windows I can run tktable on my MAC, but I cannot run the tktable.Table() command on my windows or linux. I wonder if I miss anything? I spend long time on installing tktable on Fedora, but it didnot work. Tktable2.10 path: /usr/lib/Tktable2.10 Do i need to add it into tcl path or? And if i need how can I do that? Can anyone help me? It is hard to find another tool as tktable to build table in tkinter. Problem:

File "/home/parallels/Downloads/tktable.py", line 134, in __init__
    tkinter.Widget.__init__(self, master, 'table', kw)
  File "/usr/lib64/python3.6/tkinter/__init__.py", line 2293, in __init__
    (widgetName, self._w) + extra + self._options(cnf))
_tkinter.TclError: invalid command name "table"

LyeeH avatar Jan 30 '18 06:01 LyeeH

@LyeeH Please, see this: https://github.com/nbro/tktable/issues/1#issuecomment-244519589. It may help you.

nbro avatar Jan 31 '18 12:01 nbro

@nbro Thanks, I found the source to install on fedora now by installing tktable.rpm (I use the 86x64 .rpm). Yea, but it still hard to install it on Windows.

LyeeH avatar Feb 01 '18 08:02 LyeeH

this code makes use of the env var TKTABLE_LIBRARY, if you set it to the path where the tk module for tktable is it should work (in your case it seems to be /usr/lib/Tktable2.10). Try TKTABLE_LIBRARY=/usr/lib/Tktable2.10 python someexample.py

gpip avatar Feb 15 '18 15:02 gpip

@LyeeH I found it difficult to find a binary distribution fow windows, especially as i'm using 64 bit, I did however find by accident that ActiveTcl maintain a distribution of Tk that contains tktable so I simply copied that version to my python tcl directory.

JamesGKent avatar Nov 30 '18 12:11 JamesGKent