Mailing List Archive

problems using Tkinter
I get the following error whenever I attempt to use Tk

Os AIX4.2.1
Python 1.5.2
Tk/TCL 8.0.1

from Tkinter import * .............this works
root=Tk() ........... this errors with the following message

File "/usr/local/lib/python1.5/lib-tk/Tkinter.py", line 886, in __init__
self.tk = _tkinter.create(screenName, baseName, className)

TclError: invalid command name "tcl_findLibrary"
problems using Tkinter [ In reply to ]
Gordon Vinther <gvinther@atex.com> wrote:
> I get the following error whenever I attempt to use Tk
>
> Os AIX4.2.1
> Python 1.5.2
> Tk/TCL 8.0.1
>
> from Tkinter import * .............this works
> root=Tk() ........... this errors with the following message
>
> File "/usr/local/lib/python1.5/lib-tk/Tkinter.py", line 886, in __init__
> self.tk = _tkinter.create(screenName, baseName, className)
>
> TclError: invalid command name "tcl_findLibrary"

looks like tkinter is picking up the wrong Tcl/Tk
library files. try setting the TCL_LIBRARY and
TK_LIBRARY environment variables.

</F>
problems using Tkinter [ In reply to ]
Have you tried making you programme like this:

class tester(Frame):
def Create_Widgets(self):
self.QuitB = Button(butFrame, text='Quit', fg='red',
command=self.quit)
self.QuitB.pack(side='left')
def __init__(self, master=None):
Frame.__init__(self, master)
self.pack()
self.Create_Widgets()

test = tester()
test.mainloop()

I know it is not much help but if this works it is better than not being
able to do anything.
Dan

Gordon Vinther wrote:

> I get the following error whenever I attempt to use Tk
>
> Os AIX4.2.1
> Python 1.5.2
> Tk/TCL 8.0.1
>
> from Tkinter import * .............this works
> root=Tk() ........... this errors with the following message
>
> File "/usr/local/lib/python1.5/lib-tk/Tkinter.py", line 886, in __init__
> self.tk = _tkinter.create(screenName, baseName, className)
>
> TclError: invalid command name "tcl_findLibrary"
problems using Tkinter [ In reply to ]
I get the following error whenever I attempt to use Tk

Os AIX4.2.1
Python 1.5.2
Tk/TCL 8.0.1

from Tkinter import * .............this works
root=Tk() ........... this errors with the following message

File "/usr/local/lib/python1.5/lib-tk/Tkinter.py", line 886, in __init__
self.tk = _tkinter.create(screenName, baseName, className)

TclError: invalid command name "tcl_findLibrary"


Doesn't this look like a Tcl problem? All modules Tcl/Tk/Python compile and
test ok.
problems using Tkinter [ In reply to ]
Fredrik Lundh <fredrik@pythonware.com> wrote in message
news:02fc01beadf0$b3c3ea30$f29b12c2@pythonware.com...
> Gordon Vinther <gvinther@atex.com> wrote:
> > I get the following error whenever I attempt to use Tk
> >
> > Os AIX4.2.1
> > Python 1.5.2
> > Tk/TCL 8.0.1
> >
> > from Tkinter import * .............this works
> > root=Tk() ........... this errors with the following message
> >
> > File "/usr/local/lib/python1.5/lib-tk/Tkinter.py", line 886, in __init__
> > self.tk = _tkinter.create(screenName, baseName, className)
> >
> > TclError: invalid command name "tcl_findLibrary"
>
> looks like tkinter is picking up the wrong Tcl/Tk
> library files. try setting the TCL_LIBRARY and
> TK_LIBRARY environment variables.
>
> </F>
>
I tried the environment variables with no help. Doesn't this look like a
Tcl/tk problem? Has anyone run Python with the new version of Tcl/Tk8.nn??
This is completely new code. Mayby Tkinter doesn't run with it.
It seems Tcl is complaining about a command it doesn't understand....!!!!!!
and not that it is not being communicated with.