Bug in vtkLoadPythonTkWidgets.py with Tk 8.6
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
The following script:
import Tkinter import vtk.tk.vtkTkRenderWidget
create root window
root = Tkinter.Tk()
Create 2 panes
pane1=vtk.tk.vtkTkRenderWidget.vtkTkRenderWidget(root) pane2=vtk.tk.vtkTkRenderWidget.vtkTkRenderWidget(root)
Fails with:
Traceback (most recent call last): File "test.py", line 9, in pane2=vtk.tk.vtkTkRenderWidget.vtkTkRenderWidget(root) File "/usr/lib/pymodules/python2.7/vtk/tk/vtkTkRenderWidget.py", line 81, in init vtkLoadPythonTkWidgets(master.tk) File "/usr/lib/pymodules/python2.7/vtk/tk/vtkLoadPythonTkWidgets.py", line 15, in vtkLoadPythonTkWidgets if string.find(loaded, pkgname) >= 0: File "/usr/lib/python2.7/string.py", line 361, in find return s.find(*args) AttributeError: 'tuple' object has no attribute 'find'
I think this is because the interface of the Tk function loaded has changed, and now returns a tuple, whereas previously it returned a string:
This is on the following system:
Python 2.7.6 Ubuntu 14.04.1 LTS Tkinter: version = "$Revision: 81008 $" Tk: 8.6.0+6ubuntu3 VTK: 5.8.0