[vtkusers] Problem VTK4 + python 2.2

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Mon Jan 14 04:57:53 EST 2002


>>>>> "JP" == Jose Paulo Moitinho de Almeida <moitinho at civil.ist.utl.pt> writes:


    JP>     def init_scalar_bar (self): "Sets up the default scalar
    JP> bar."  debug ("In LutHandler::init_scalar_bar ()") self.sc_bar
    JP> = vtkpython.vtkScalarBarActor () self.sc_bar.SetLookupTable
    JP> (self.lut)

    JP> I got in the SetLookupTable command a: "ValueError: method
    JP> requires a VTK object (in init_scalar_bar)"

Ahh, I remember this one.  I had this happen to me long back.  IIRC,
this happens when you have two copies of the VTK libraries accessible
in different places and when a module is somehow imported twice.  In
my situation I had built VTK with the libs in
/skratch/prabhu/vtk/cvs/VTK/lib and I had also copied those libraries
to another directory to make some binaries.  I had my LD_LIBRARY_PATH
set to the directory /skratch/prabhu/vtk/cvs/VTK/lib and even when I
unset it and set it to the current directory (where I had copied the
libs) I would get this ValueError exception.  What I finally needed to
do was to change the name of the build directory from lib to lib1 (I
just moved the lib dir to lib1) and things worked.  I think the
problem is because the libvtk modules are being imported twice.  It
was Gordon McMillan who suggested this possibility to me.

prabhu



More information about the vtkusers mailing list