problem when using vtkTkRenderWidget with Tix.Tk widgets
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
I recently started using Tix widget set on top of Tk, when I ported my vtk code I got the following error:
Traceback (most recent call last): File "./ggcmplot_v2.0.1.py", line 1557, in ? vp_start_gui() File "./ggcmplot_v2.0.1.py", line 44, in vp_start_gui w = GGCM_Plot (root) File "./ggcmplot_v2.0.1.py", line 1550, in init self.InitializePlotWindow() File "./ggcmplot_v2.0.1.py", line 328, in InitializePlotWindow self.RenderWidget = vtkTkRenderWidget(self.PlotWindow, width=800,height=800) File "/usr/local/lib/python2.3/site-packages/vtk_python/vtk/tk/vtkTkRenderWidget.py", line 84, in init vtkLoadPythonTkWidgets(master.tk) File "/usr/local/lib/python2.3/site-packages/vtk_python/vtk/tk/vtkLoadPythonTkWidgets.py", line 38, in vtkLoadPythonTkWidgets if len(prev) > 0 and prev[0] == '{' and prev[-1] != '}': TypeError: len() of unsized object
I can fix it by changing line 33 of vtkLoadPythonTkWidgets.py, from:
prev = pathlist[-1]
to:
prev = str(pathlist[-1])
The change doesn't affect apps that don't use Tix, I tested the old code after making it and it ran fine.
Would it be possible to have this change in the next release of VTK? or some other change so that using the Tix widgets and vtk is possible?