[vtkusers] Error with VTK4.0 and python2.2: "ValueError: method requires a VTK object"

Charl P. Botha c.p.botha at its.tudelft.nl
Mon Apr 8 03:31:53 EDT 2002


On Mon, Apr 08, 2002 at 06:11:10AM +0530, Prabhu Ramachandran wrote:
> >>>>> "SX" == Scott X <scott_01 at hotmail.com> writes:
>     SX> File "mybottle.py", line 58, in mylens
>     SX> extrude.SetInput(profile) ValueError: method requires a VTK
>     SX> object
> 
> This can happen when you have different versions of the VTK python
> libraries.  Look here:
> 
> http://public.kitware.com/pipermail/vtkusers/2002-January/009018.html

It can also happen when one isn't importing the necessary VTK modules.  I.e.
some of the older examples have:
from libVTKCommonPython import *
from libVTKGraphicsPython import *
whereas:
from vtkpython import *
would be safer, seeing that classes have been moved around since 3.2.

-- 
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/



More information about the vtkusers mailing list