[vtk-developers] Bug: vtkTkRenderWidget.py.

David Gobbi dgobbi at irus.rri.ca
Wed Oct 31 10:47:30 EST 2001


Hi Prabhu,

Did you recently upgrade your system?  We have the same problem on
on a RedHat 7.2 system, which has XFree86-4.1, tcl/tk-8.3.3 and
python-1.5.2.  For some reason tcl is looking for "vtkTkRenderWidget.so"
instead of looking for "vtkTkRenderWidget" like it used to.

A very simple fix is "ln -s vtkTkRenderWidget vtkTkRenderWidget.so"
but I don't know what caused the problem in the first place.

 - David


On Wed, 31 Oct 2001, Prabhu Ramachandran wrote:

> hi,
>
> I found a bug that I'm having difficulty figuring out thanks to my
> inadequate knowledge of Tcl/Tk and the intricacies of Tkinter.  Here
> is a tiny python script that will raise a TclError.
>
> #--------------------------------------------------
> import Tkinter, vtkpython, vtkRenderWidget
>
> def test():
>     r = Tkinter.Tk()
>     tkw = vtkRenderWidget.vtkTkRenderWidget(r)
>
> if __name__ == '__main__':
>     r = Tkinter.Tk()
>     r.withdraw()
>     test()
>     # comment out the next test function and everything works.
>     test()
>     r.mainloop()
> #--------------------------------------------------
>
> Here is the error I get.
>
> #--------------------------------------------------
> $ python tkbug.py
> Traceback (most recent call last):
>   File "tkbug.py", line 12, in ?
>     test()
>   File "tkbug.py", line 5, in test
>     tkw = vtkRenderWidget.vtkTkRenderWidget(r)
>   File "/skratch/prabhu/vtk/cvs/VTK/Wrapping/Python/vtkTkRenderWidget.py", line 80, in __init__
>     Tkinter.Widget.__init__(self, master, 'vtkTkRenderWidget', cnf, kw)
>   File "/usr/local/lib/python2.1/lib-tk/Tkinter.py", line 1756, in __init__
>     self.tk.call(
> TclError: invalid command name "vtkTkRenderWidget"
> #--------------------------------------------------
>
> it fails as soon as the second test() is called.  I looked at the
> code, and can't figure out why this happens.  It seems that only the
> first tkapp object is able to load the vtkTkRenderWidget?!
>
> Thanks,
> prabhu
>
>




More information about the vtk-developers mailing list