[vtkusers] Problems with RedHat 7.3 and python

Christian Pfaffel flash at itp.tu-graz.ac.at
Thu Sep 26 12:07:11 EDT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi,

I have got the following problem. I have compiled and installed vtk on
redhat 7.3. Simple examples (e.g. cone.py) do work. The following code
snippet though produces an error:

python2 <<EOF
import Numeric
from vtkpython import *

bfield = vtkFloatArray()
bfield_data = Numeric.reshape((1), (1, 1))
bfield.SetVoidArray(bfield_data,1,0)

points = vtkPoints()
verts = vtkCellArray()
points.InsertNextPoint(0,0,0)
verts.InsertNextCell(1)
verts.InsertCellPoint(0)
    
torus = vtkPolyData()
torus.SetPoints(points)
torus.SetVerts(verts)
torus.GetPointData().SetScalars(bfield)
   
writer = vtkPolyDataWriter()
writer.SetFileName('testout.vtk')
writer.SetInput(torus)                    # <- Here it fails
writer.Write()                  
EOF

It fails with:
...
Traceback (most recent call last):
  File "<stdin>", line 21, in ?
ValueError: method requires a VTK object

execution of the same lines on redhat 7.2 produces the desired
testfile. I do not know what else to do.  I tried release 4.0, and cvs
from 20020925.

Help will be very much appreciated. 

Best regards and thanks in advance,

Christian Pfaffel

- -- 
PGP-Key: http://fubphpc.tu-graz.ac.at/~flash/pubkey.gpg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.7 <http://mailcrypt.sourceforge.net/>

iD8DBQE9kzCmzNp7/ndBhMQRAg5mAJ9flEocb0U5fXOEoJjr9T+DltyR8gCfcg5I
nAICTkLsWPIz0eAdgWDhfr0=
=id+j
-----END PGP SIGNATURE-----



More information about the vtkusers mailing list