1

Being very new to Phyton, I’m trying to use tktable for Python and can’t get it run on my PC. After searching a lot in the net, without finding any solution, I hope you find the time to help me a bit. I’m sure this is peanuts for you.

I’m running Python 3.7 on a Windows 8.1. PC.

I’m getting this error:

_tkinter.TclError: invalid command name "table"

What I did so far:

  1. Downloaded tktable and run the setup.py.
  2. Copied the tktable.py to the Python site-packages folder.
  3. Installed ActiveTcl.
  4. Copied the three files tktable.tcl, Tktable.dll and pkgIndex.tcl from ActiveTcl (C:\ActiveTcl\lib\Tktable2.11) to C:........\Python\Python37-32\tcll\Tktable2.11.
  5. According what I have found in the net, this should do it…

But, as I wrote, I keep getting the error I mentioned.

Michael

The content is:

C:\Users\mschuppisser.EAD\AppData\Local\Programs\Python\Python37-32\Lib\;
C:\Users\mschuppisser.EAD\AppData\Local\Programs\Python\Python37-32\DLLs\

Traceback:

Exception in Tkinter callback
Traceback (most recent call last):
  File "C:\Users\mschuppisser.EAD\AppData\Local\Programs\Python\Python37-32\lib\tkinter\__init__.py", line 1705, in __call__
    return self.func(*args)
  File "C:/Users/mschuppisser.EAD/Data/My Data/Python/Test Applikation/Test Applikation.py", line 267, in Jump_to_UebersichtsFenster3
    application = clsUebersichtsFenster3(UebersichtsFenster3)
  File "C:/Users/mschuppisser.EAD/Data/My Data/Python/Test Applikation/Test Applikation.py", line 447, in __init__
    self.table_grid = tktable.Table(UebersichtsFenster3) # , state='disabled', width=50, titlerows=1, rows=5, cols=4, colwidth=20)
  File "C:\Users\mschuppisser.EAD\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tktable.py", line 135, in __init__
    tkinter.Widget.__init__(self, master, 'table', kw)
  File "C:\Users\mschuppisser.EAD\AppData\Local\Programs\Python\Python37-32\lib\tkinter\__init__.py", line 2299, in __init__
    (widgetName, self._w) + extra + self._options(cnf))
_tkinter.TclError: invalid command name "table"
stovfl
  • 14,998
  • 7
  • 24
  • 51
MichaelS
  • 11
  • 4
  • No `\tcl` path. Edit your Question and show the **Full Traceback**. Are you familiar with [They go into Python folder like so:](http://blog.clintecker.com/post/148453368/tktable-for-tkinter-and-python). `C:\Python2.x` becomes your `C:...\Python\Python37-32` – stovfl Mar 20 '19 at 12:53
  • Thx for the idea @stovfl! I tried both, adding the \tcl to the list in regedit and moving the Tktable.dll file to the DDL folder. Same error……. Any other idea? – MichaelS Mar 20 '19 at 13:07
  • Yes @stovfl, I have C:\ActiveTcl\lib\Tktable2.11. It's the same as C:\Users\mschuppisser.EAD\AppData\Local\Programs\Python\Python37-32\tcl\Tktable2.11. – MichaelS Mar 21 '19 at 12:53
  • This is my full traceback. Will go through 'They go into Python folder like so' next week. I'm in Project work at the moment. Thx for your support @stovfl! – MichaelS Mar 21 '19 at 12:55
  • Hi @stovfl Ok, had time to spend a few minutes on this issue besides project work. The .dll and the two tcls are in Tktable2.11. This is simply the newer version of 2.7. At least the original folders name was 2.11 too. Lib.lib-tk I had to create and moved the thtable.py there. My program didn’t recognize this folder a a lib, so I added it in the code using sys.path.insert(0, …..). Now it finds the module but still failing with the same error. Oddly it created a .egg file… hope this is ok. Cheers Michael – MichaelS Mar 25 '19 at 12:11
  • The error is **not** about `tktable.py`, this is the Python `tkinter` part, `lib/lib-tk` looks OK. The error is not finding or loading `Tktable.dll`. What's the point here, **NOT** using **only** the `ActiveTcl` distribution? – stovfl Mar 25 '19 at 13:25
  • Hi stovfl I don't get you. I have copied the three ActiveTcl files from ist original place to the Python tcl folder. Path is C:\.......\Python\Python37-32\tcl\Tktable2.11. – MichaelS Mar 25 '19 at 13:43
  • Your path `C:\...Python\Python37-32\tcl\Tktable2.11` looks OK. Sorry, the name is [activestate.com/products/activepython/](https://www.activestate.com/products/activepython/) – stovfl Mar 25 '19 at 13:57
  • Hi stovfl I don't see how this link can help me with my Python tkTable problem. Unless you think this Teapot tool can help me? Cheers Michael – MichaelS Mar 26 '19 at 07:46
  • Hi @stovfl, done: https://github.com/SchuppiM/Python-tkTable/blob/master/tkTable%20Problem – MichaelS Mar 27 '19 at 11:54

0 Answers0