View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001443VTK(No Category)public2004-12-21 17:052011-01-13 17:00
ReporterBurlen 
Assigned ToMathieu Malaterre 
PrioritylowSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001443: problem when using vtkTkRenderWidget with Tix.Tk widgets
DescriptionI 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?
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0001837)
Mathieu Malaterre (developer)
2004-12-22 22:59

Fixed in CVS. Thanks Burlen.
$ cvs ci
/cvsroot/VTK/VTK/Wrapping/Python/vtk/tk/vtkLoadPythonTkWidgets.py,v <-- vtkLoadPythonTkWidgets.py
new revision: 1.3; previous revision: 1.2

 Issue History
Date Modified Username Field Change
2010-11-29 17:59 Mathieu Malaterre Source_changeset_attached => VTK master e3f01765
2011-01-13 17:00 Source_changeset_attached => VTK master a2bd8391
2011-01-13 17:00 Source_changeset_attached => VTK master 020ef709
2011-06-16 13:11 Zack Galbreath Category => (No Category)


Copyright © 2000 - 2018 MantisBT Team