I also tried with Paraview-3.6.2. <br><br>Below is the code:<br><br>#! /usr/bin/pvpython<br><br>from paraview.simple import *<br>from paraview.simple import servermanager as sm<br>from paraview import vtk<br><br># connect internally<br>
connection=sm.Connect()<br><br><br># Set the pvpython path<br>INPUTFILE="test.vtu"<br>OUTPUTFILE="tested.vtu"<br><br># create a reader<br>reader=sm.sources.XMLUnstructuredGridReader(FileName=INPUTFILE)<br>
<br># get the data i.e moves data from the server to the client<br>data = sm.Fetch(reader)<br><br>ndata=vtk.vtkUnstructuredGrid();<br>ndata.CopyStructure(ndata);<br>ndata.GetPointData().AddArray(data.GetPointData().GetArray(0));<br>
<br><br>f=open('trivialproducer.xml','r')<br>parser=sm.vtkSMXMLParser()<br>parser.Parse(f.read())<br>parser.ProcessConfiguration(sm.vtkSMObject.GetProxyManager())<br><br># Update the modules<br>sm.updateModules()<br>
<br>tp=sm.sources.TrivialProducer()<br>obj=tp.GetClientSideObject()<br>obj.SetOutput(ndata)<br><br><br>writer=sm.writers.XMLUnstructuredGridWriter(DataMode=1,FileName=OUTPUTFILE,Input=obj)<br><br>writer.UpdatePipeline()<br>
<br><br>The errors:<br><br>paraview version 3.6.2, Date: 2009-05-18<br>getting appended<br>vtkReductionFilter : [ ...........]<br>Traceback (most recent call last):<br> File "convert.py", line 83, in <module><br>
writer=sm.writers.XMLUnstructuredGridWriter(DataMode=1,FileName=OUTPUTFILE,Input=obj)<br> File "/home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/ParaView3Bin/Utilities/VTKPythonWrapping/paraview/servermanager.py", line 186, in __init__<br>
File "/home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/ParaView3Bin/Utilities/VTKPythonWrapping/paraview/servermanager.py", line 204, in __setattr__<br> File "/home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/ParaView3Bin/Utilities/VTKPythonWrapping/paraview/servermanager.py", line 2329, in setProperty<br>
File "/home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/ParaView3Bin/Utilities/VTKPythonWrapping/paraview/servermanager.py", line 253, in SetPropertyWithName<br> File "/home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/ParaView3Bin/Utilities/VTKPythonWrapping/paraview/servermanager.py", line 1155, in SetData<br>
AttributeError: SMProxy<br><br><br>Any help will be appreciated!<br>