Hello,<br><div class="gmail_quote"><br>I got this message "Could not locate array z in the input" executing code coming from Python Trace using Paraview 3.8.1<br><br>Any Idea?<br><br>The weird things is that my sample code is working fine with some pvd file (using vtu files), but not with some others .... <br>
However, I can open the "non-working" one with paraview<br><br>The code executed is coming from the Python trace of Paraview 3.8.1<br>Is there a workaround for this kind of issues?<br><br><div><div class="im">python test_view2.py <br>
vtkPVDReader : [ ...........]<br>
vtkPVArrayCalculator : [ ...........]<br>
vtkPVArrayCalculator : [ ...........]<br>
vtkThreshold : [ ...........]</div><div><br><div class="im">
Traceback (most recent call last):<br></div></div><div class="im">
File "test_view2.py", line 297, in <module><br>
my_representation7.ColorArrayName = 'z'<br>
File "/usr/local/ParaView-3.8.1-Linux-x86_64/lib/paraview-3.8/site-packages/paraview/servermanager.py", line 204, in __setattr__<br>
setter(self, value)<br>
File "/usr/local/ParaView-3.8.1-Linux-x86_64/lib/paraview-3.8/site-packages/paraview/servermanager.py", line 2364, in setProperty<br>
return self.SetPropertyWithName(propName, value)<br>
File "/usr/local/ParaView-3.8.1-Linux-x86_64/lib/paraview-3.8/site-packages/paraview/servermanager.py", line 253, in SetPropertyWithName<br>
prop.SetData(arg)<br>
File "/usr/local/ParaView-3.8.1-Linux-x86_64/lib/paraview-3.8/site-packages/paraview/servermanager.py", line 684, in SetData<br>
raise ValueError("Could not locate array %s in the input." % arr)<br>
ValueError: Could not locate array z in the input.</div></div><div class="im"><br>Do you have any idea or workaround to avoid this?<br><br>Thanks a lot for your help,<br><br>Best Regards,<br><font color="#888888"><br>Laurent</font><br>
<br></div><div><div></div><div class="h5"><div class="gmail_quote">
On Tue, Aug 31, 2010 at 4:25 PM, pat marion <span dir="ltr"><<a href="mailto:pat.marion@kitware.com" target="_blank">pat.marion@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;">
Laurent sent me the data off list. I took a look at it and determined the problem is something that has already been corrected since the 3.8 release. Here is the problem and how to fix it for those users with v3.8:<br>
<br>
clip = Clip(...)<br>...code constructs representations and sets display properties...<br>clip.ClipType.Origin = [...]<br>clip.ClipType.Normal = [...]<br><br>What is happening is the clip filter is constructed, some properties are set in the constructor, but the properties defining the clip plane are not set until the end of the python script. It is fixed by just moving the code to just after the constructor:<br>
<br>clip = Clip(...)<br>
clip.ClipType.Origin = [...]<br>
clip.ClipType.Normal = [...]<br>
...code constructs representations and sets display properties...<br><br>This issue will occur for the clip, cut, glyph, and possibly other filters. It was fixed on April 30 with git commit d9119f6be4b10 and exists in the release branch as well.<br>
<font color="#888888">
<br>Pat</font><div><div></div><div><br><br><br><div class="gmail_quote">On Tue, Aug 31, 2010 at 3:18 AM, Laurent Vanboquestal <span dir="ltr"><<a href="mailto:laurent.vanboquestal@gmail.com" target="_blank">laurent.vanboquestal@gmail.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;">Hello Pat,<br><br>It has been generated using the "trace state button" .... The generated code is huge (about 900 lines of python code),<br>
<br>Regards,<br><font color="#888888"><br>Laurent</font><div><div></div><div><br><br><div class="gmail_quote">On Mon, Aug 30, 2010 at 5:59 PM, pat marion <span dir="ltr"><<a href="mailto:pat.marion@kitware.com" target="_blank">pat.marion@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;">How are you generating the python trace? Is it recorded using the start/stop trace buttons, or using the trace state button? Is it possible to attach the python trace script and/or the dataset?<br>
<br>Pat<br><br><div class="gmail_quote"><div><div></div><div>
On Mon, Aug 30, 2010 at 10:28 AM, Laurent Vanboquestal <span dir="ltr"><<a href="mailto:laurent.vanboquestal@gmail.com" target="_blank">laurent.vanboquestal@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div>
Hi all,<br><br>I got some problems with the generated python code using paraview 3.8 (Python Trace State).<br><br>Using paraview GUI, I can load my pvsm file and when selecting "Glyph2" in the pipeline browser, I<br>
can set values like 'Solid Color', 'cellNormal', 'Velocity_Bis', ...<br><br>However, when executing the generated code using pvpython, I got this error:<br><br>vtkPVDReader : [ ...........]<br>vtkPVArrayCalculator : [ ...........]<br>
vtkPVArrayCalculator : [ ...........]<br>vtkWarpVector : [ ...........]<br>vtkPVClipDataSet : [ ...........]<br>vtkPVArrowSource : [ ...........]<br>vtkPVGlyphFilter : [ ...........]<br>Traceback (most recent call last):<br>
File "p5.py", line 365, in <module><br> DataRepresentation13.ColorArrayName = 'Velocity_bis'<br> File "/home/kitware/Dashboard/MyTests/ParaView-3-8/ParaView-3.8/ParaViewBin/Utilities/VTKPythonWrapping/paraview/servermanager.py", line 204, in __setattr__<br>
File "/home/kitware/Dashboard/MyTests/ParaView-3-8/ParaView-3.8/ParaViewBin/Utilities/VTKPythonWrapping/paraview/servermanager.py", line 2361, in setProperty<br> File "/home/kitware/Dashboard/MyTests/ParaView-3-8/ParaView-3.8/ParaViewBin/Utilities/VTKPythonWrapping/paraview/servermanager.py", line 253, in SetPropertyWithName<br>
File "/home/kitware/Dashboard/MyTests/ParaView-3-8/ParaView-3.8/ParaViewBin/Utilities/VTKPythonWrapping/paraview/servermanager.py", line 681, in SetData<br>ValueError: Could not locate array Velocity_bis in the input.<br>
<br>Any idea? Or advice to tackle this issue?<br><br>Best Regards,<br><font color="#888888"><br>Laurent<br>
</font><br></div></div>_______________________________________________<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>
</blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></div><br>