[vtk-developers] vtkInteratorStyle python subclass instantiation: TypeError: method requires a string argument
David Lonie
david.lonie at kitware.com
Wed Aug 26 15:02:30 EDT 2015
I'm updating some code for a client to use current VTK master, and there's
an error while instantiating a python class that derives from
vtkInteractorStyle. It seems to be related to __init__ taking an extra
parameter which is used by the subclass to initialize some internals.
A minimal example that reproduces the error:
test.py:
import vtk
class MyInteractorStyle(vtk.vtkInteractorStyleUser):
def __init__(self, arg):
pass
obj = MyInteractorStyle(2)
$ vtkpython test.py
Traceback (most recent call last):
File "/tmp/test.py", line 7, in <module>
obj = MyInteractorStyle(2)
TypeError: method requires a string argument
Removing the extra argument from __init__ will make the error go away.
This worked a few months ago last time we bumped their VTK version. Is this
a bug?
Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20150826/c28105f2/attachment.html>
More information about the vtk-developers
mailing list