[Paraview] some tables cannot be located using paraview.simple python api
pat marion
pat.marion at kitware.com
Tue Aug 31 10:25:15 EDT 2010
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:
clip = Clip(...)
...code constructs representations and sets display properties...
clip.ClipType.Origin = [...]
clip.ClipType.Normal = [...]
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:
clip = Clip(...)
clip.ClipType.Origin = [...]
clip.ClipType.Normal = [...]
...code constructs representations and sets display properties...
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.
Pat
On Tue, Aug 31, 2010 at 3:18 AM, Laurent Vanboquestal <
laurent.vanboquestal at gmail.com> wrote:
> Hello Pat,
>
> It has been generated using the "trace state button" .... The generated
> code is huge (about 900 lines of python code),
>
> Regards,
>
> Laurent
>
>
> On Mon, Aug 30, 2010 at 5:59 PM, pat marion <pat.marion at kitware.com>wrote:
>
>> 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?
>>
>> Pat
>>
>> On Mon, Aug 30, 2010 at 10:28 AM, Laurent Vanboquestal <
>> laurent.vanboquestal at gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> I got some problems with the generated python code using paraview 3.8
>>> (Python Trace State).
>>>
>>> Using paraview GUI, I can load my pvsm file and when selecting "Glyph2"
>>> in the pipeline browser, I
>>> can set values like 'Solid Color', 'cellNormal', 'Velocity_Bis', ...
>>>
>>> However, when executing the generated code using pvpython, I got this
>>> error:
>>>
>>> vtkPVDReader : [ ...........]
>>> vtkPVArrayCalculator : [ ...........]
>>> vtkPVArrayCalculator : [ ...........]
>>> vtkWarpVector : [ ...........]
>>> vtkPVClipDataSet : [ ...........]
>>> vtkPVArrowSource : [ ...........]
>>> vtkPVGlyphFilter : [ ...........]
>>> Traceback (most recent call last):
>>> File "p5.py", line 365, in <module>
>>> DataRepresentation13.ColorArrayName = 'Velocity_bis'
>>> File
>>> "/home/kitware/Dashboard/MyTests/ParaView-3-8/ParaView-3.8/ParaViewBin/Utilities/VTKPythonWrapping/paraview/servermanager.py",
>>> line 204, in __setattr__
>>> File
>>> "/home/kitware/Dashboard/MyTests/ParaView-3-8/ParaView-3.8/ParaViewBin/Utilities/VTKPythonWrapping/paraview/servermanager.py",
>>> line 2361, in setProperty
>>> File
>>> "/home/kitware/Dashboard/MyTests/ParaView-3-8/ParaView-3.8/ParaViewBin/Utilities/VTKPythonWrapping/paraview/servermanager.py",
>>> line 253, in SetPropertyWithName
>>> File
>>> "/home/kitware/Dashboard/MyTests/ParaView-3-8/ParaView-3.8/ParaViewBin/Utilities/VTKPythonWrapping/paraview/servermanager.py",
>>> line 681, in SetData
>>> ValueError: Could not locate array Velocity_bis in the input.
>>>
>>> Any idea? Or advice to tackle this issue?
>>>
>>> Best Regards,
>>>
>>> Laurent
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the ParaView Wiki at:
>>> http://paraview.org/Wiki/ParaView
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.paraview.org/mailman/listinfo/paraview
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20100831/ee2a29bf/attachment-0001.htm>
More information about the ParaView
mailing list