[Paraview] vtkPVTrivialProducer issues

wastrel at gmail.com wastrel at gmail.com
Sat Apr 24 00:17:00 EDT 2010


I also tried with Paraview-3.6.2.

Below is the code:

#! /usr/bin/pvpython

from paraview.simple import *
from paraview.simple import servermanager as sm
from paraview import vtk

# connect internally
connection=sm.Connect()


# Set the pvpython path
INPUTFILE="test.vtu"
OUTPUTFILE="tested.vtu"

# create a reader
reader=sm.sources.XMLUnstructuredGridReader(FileName=INPUTFILE)

# get the data i.e moves data from the server to the client
data = sm.Fetch(reader)

ndata=vtk.vtkUnstructuredGrid();
ndata.CopyStructure(ndata);
ndata.GetPointData().AddArray(data.GetPointData().GetArray(0));


f=open('trivialproducer.xml','r')
parser=sm.vtkSMXMLParser()
parser.Parse(f.read())
parser.ProcessConfiguration(sm.vtkSMObject.GetProxyManager())

# Update the modules
sm.updateModules()

tp=sm.sources.TrivialProducer()
obj=tp.GetClientSideObject()
obj.SetOutput(ndata)


writer=sm.writers.XMLUnstructuredGridWriter(DataMode=1,FileName=OUTPUTFILE,Input=obj)

writer.UpdatePipeline()


The errors:

paraview version 3.6.2, Date: 2009-05-18
getting appended
vtkReductionFilter : [ ...........]
Traceback (most recent call last):
  File "convert.py", line 83, in <module>

writer=sm.writers.XMLUnstructuredGridWriter(DataMode=1,FileName=OUTPUTFILE,Input=obj)
  File
"/home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/ParaView3Bin/Utilities/VTKPythonWrapping/paraview/servermanager.py",
line 186, in __init__
  File
"/home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/ParaView3Bin/Utilities/VTKPythonWrapping/paraview/servermanager.py",
line 204, in __setattr__
  File
"/home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/ParaView3Bin/Utilities/VTKPythonWrapping/paraview/servermanager.py",
line 2329, in setProperty
  File
"/home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/ParaView3Bin/Utilities/VTKPythonWrapping/paraview/servermanager.py",
line 253, in SetPropertyWithName
  File
"/home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/ParaView3Bin/Utilities/VTKPythonWrapping/paraview/servermanager.py",
line 1155, in SetData
AttributeError: SMProxy


Any help will be appreciated!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100423/0816d40f/attachment.htm>


More information about the ParaView mailing list