That's right, if the output has no point or cell data, then assigning the ColorArrayName property will throw an exception. It's kind of an annoying behavior. So I'll work around this by writing code such as:<br>
<br>if mySlice.GetDataInformation().GetNumberOfPoints():<br> rep.ColorArrayName='p'<br><br><br>Pat<br><br><div class="gmail_quote">On Fri, Nov 11, 2011 at 12:39 PM, Andy Bauer <span dir="ltr"><<a href="mailto:andy.bauer@kitware.com">andy.bauer@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Another thing to check is if there are any cells in the output from the second slice filter. In the ParaView GUI, i started with the mandelbrot source and then created a slice filter that didn't intersect the domain. After that there wasn't any point or cell data in the output.<br>
<font color="#888888">
<br>Andy</font><div><div></div><div class="h5"><br><br><div class="gmail_quote">2011/11/11 Takuya OSHIMA <span dir="ltr"><<a href="mailto:oshima@eng.niigata-u.ac.jp" target="_blank">oshima@eng.niigata-u.ac.jp</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I'm not in a place where I can test the line 323 modification right<br>
now but the cell array p is present. Please note that oneSlice.py<br>
which also colors by cell p works.<br>
<div><br>
Takuya OSHIMA, Ph.D.<br>
Faculty of Engineering, Niigata University<br>
8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN<br>
<br>
</div>From: Utkarsh Ayachit <<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>><br>
Subject: Re: [Paraview] PV 3.12.0 coprocessing problem when using multiple filters<br>
Date: Fri, 11 Nov 2011 09:16:18 -0500<br>
<div><div></div><div><br>
> Is the array "p" not present when you're coprocessnig? Try taking out<br>
> line 323 which sets the array "p" as the array to color with.<br>
><br>
> Utkarsh<br>
><br>
> On Fri, Nov 11, 2011 at 9:08 AM, Takuya OSHIMA<br>
> <<a href="mailto:oshima@eng.niigata-u.ac.jp" target="_blank">oshima@eng.niigata-u.ac.jp</a>> wrote:<br>
> > Hi,<br>
> ><br>
> > I am trying to explore the coprocessing capability of PV 3.12.0. When<br>
> > I create a pipeline with a single slice filter within the PV GUI,<br>
> > export the Python state file by the coprocessing plugin and run the<br>
> > script as the coprocessing pipleline in my simulation code, it works<br>
> > fine.<br>
> ><br>
> > However if I create a pipeline with two or more filters my simulation<br>
> > code issues an error from the coprocessing library (the error message<br>
> > is for the case of two slice filters):<br>
> ><br>
> > Traceback (most recent call last):<br>
> > File "<string>", line 2, in <module><br>
> > File "/Users/ohshima/shindoriTest/twoSlices.py", line 323, in DoCoProcessing<br>
> > DataRepresentation2.ColorArrayName = 'p'<br>
> > File "/Volumes/RAID0data/paraview/3.12/build/Utilities/VTKPythonWrapping/site-packages/paraview/servermanager.py", line 212, in __setattr__<br>
> > setter(self, value)<br>
> > File "/Volumes/RAID0data/paraview/3.12/build/Utilities/VTKPythonWrapping/site-packages/paraview/servermanager.py", line 2276, in setProperty<br>
> > return self.SetPropertyWithName(propName, value)<br>
> > File "/Volumes/RAID0data/paraview/3.12/build/Utilities/VTKPythonWrapping/site-packages/paraview/servermanager.py", line 267, in SetPropertyWithName<br>
> > prop.SetData(arg)<br>
> > File "/Volumes/RAID0data/paraview/3.12/build/Utilities/VTKPythonWrapping/site-packages/paraview/servermanager.py", line 695, in SetData<br>
> > raise ValueError("Could not locate array %s in the input." % arr)<br>
> > ValueError: Could not locate array p in the input.<br>
> ><br>
> > The problem is same for Mac OS X 10.6 and RHEL 5.1 64bit. I attach the<br>
> > scripts oneSlice.py (which works) and twoSlices.py (which does not<br>
> > work). Can anybody shed light on the problem?<br>
> ><br>
> > Takuya<br>
> ><br>
> > Takuya OSHIMA, Ph.D.<br>
> > Faculty of Engineering, Niigata University<br>
> > 8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN<br>
> ><br>
> > _______________________________________________<br>
> > Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
> ><br>
> > Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
> ><br>
> > Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
> ><br>
> > Follow this link to subscribe/unsubscribe:<br>
> > <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
> ><br>
> ><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
</div></div></blockquote></div><br>
</div></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br>