[vtkusers] broken vtkTkRenderWindowInteractor.py in 5.2.0?

Mathieu Malaterre mathieu.malaterre at gmail.com
Tue Sep 2 09:27:59 EDT 2008


Alex,

On Tue, Sep 2, 2008 at 4:04 AM, Alexander Pletzer <pletzer at txcorp.com> wrote:
> Hi,
>
> I have downloaded and built vtk a few weeks ago from cvs. I'm encountering
> an error I never had before, which can also be reproduced by running
> vtkTkRenderWindowInteractor.py in standalone, ie running the
> vtkRenderWindowInteractorConeExample() example:
>
> [pletzer at localhost tmp]$ python
> /usr/lib/python2.5/site-packages/VTK-5.2.0-py2.5.egg/vtk/tk/vtkTkRenderWindowInteractor.py
> Traceback (most recent call last):
>  File
> "/usr/lib/python2.5/site-packages/VTK-5.2.0-py2.5.egg/vtk/tk/vtkTkRenderWindowInteractor.py",
> line 394, in <module>
>   vtkRenderWindowInteractorConeExample()
>  File
> "/usr/lib/python2.5/site-packages/VTK-5.2.0-py2.5.egg/vtk/tk/vtkTkRenderWindowInteractor.py",
> line 364, in vtkRenderWindowInteractorConeExample
>   pane = vtkTkRenderWindowInteractor(root, width=300, height=300)
>  File
> "/usr/lib/python2.5/site-packages/VTK-5.2.0-py2.5.egg/vtk/tk/vtkTkRenderWindowInteractor.py",
> line 48, in __init__
>   vtkLoadPythonTkWidgets(master.tk)
>  File
> "/usr/lib/python2.5/site-packages/VTK-5.2.0-py2.5.egg/vtk/tk/vtkLoadPythonTkWidgets.py",
> line 54, in vtkLoadPythonTkWidgets
>   if len(path) > 0 and path[0] == '{' and path[-1] == '}':
> TypeError: object of type '_tkinter.Tcl_Obj' has no len()
>
>
>>>> v = vtk.vtkVersion()
>>>> print v.GetVTKVersion()
> 5.2.0
>
>
> Any suggestion would be welcome. Thanks for your help.

That has nothing to do with VTK AFAIK. Could you try something like:


$ python
>>> s = "bla"
>>> len(s)

len is supposed to be a build in function of python. Or maybe you are
using Python 3.0 and they seriously broke backward compatibility ;)

2cts
-- 
Mathieu



More information about the vtkusers mailing list