[Paraview] Paraview Python Script with PVFWrap

pat marion pat.marion at kitware.com
Mon Jan 24 15:45:13 EST 2011


You are using 3.8.0, not 3.8.1.  If you use 3.8.1 to generate the trace
script you will not receive these errors.


Your script can also be fixed by hand-  editing test_trace.py and move the
lines at the very bottom modifying Slice1, Slice2 and Slice3.   Moving the
lines up so they appear after the constructors of Slice1, Slice2, and
Slice3.

Pat

On Mon, Jan 24, 2011 at 3:08 PM, Fabian Braennstroem
<f.braennstroem at gmx.de>wrote:

> Hi,
>
> thanks. I get this error message:
>
>
> Traceback (most recent call last):
>  File "<string>", line 382, in <module>
>  File
> "/home/gcae504/HOME/Dissertation/simulation_calc/OpenFOAM/ThirdParty-1.7.x/platforms/linux64Gcc/paraview-3.8.0/lib/paraview-3.8/paraview/servermanager.py",
> line 201, in __setattr__
>    "to add this attribute.")
> AttributeError: Attribute SelectedMapperIndex does not exist.  This class
> does not allow addition of new attributes to avoid mistakes due to typos.
> Use add_attribute() if you really want to add this attribute.
>
> I attached two pictures (test.png is the one create manually and test2.png
> the one create with the script) and the script. Thanks for your help!
>
> Best Regards!
> Fabian
>
>
> On 01/24/2011 08:57 PM, pat marion wrote:
>
>> Hi Fabian,
>>
>> Regarding your issue of python trace state not replicating your paraview
>> state exactly, I believe both issues you quote (camera position and cut
>> filter's slice property) have been addressed in the latest version of
>> paraview.  If not, can you list the steps required to repeat the
>> problem?  I can't find bug reports for these issues, but below I have
>> copied the git logs for the commits the addressed the issues.
>>
>> Pat
>>
>> commit f3f73df79fe4ca377297885c4c71bcba661b165d
>> Author: Pat Marion <pat.marion at kitware.com <mailto:pat.marion at kitware.com
>> >>
>>
>> Date:   Tue May 18 14:50:17 2010 -0400
>>
>>     BUG: Add method to disable the first render ResetCamera.
>>
>>     Added python method paraview.simple._DisableFirstRenderResetCamera()
>>     and included it at the top of all generated trace scripts.  This is
>>     tested by PythonSMTraceTest1 since I removed the extra 'Render()'
>>     call from the test which was there to work around the issue.
>>
>> commit d9119f6be4b10b97b18fc2a2d5232788363d3fc9
>> Author: Pat Marion <pat.marion at kitware.com <mailto:pat.marion at kitware.com
>> >>
>>
>> Date:   Fri Apr 30 13:35:03 2010 -0400
>>
>>     BUG: Group helper proxies with the proxy using the helper.
>>
>>     For example, now 'my_slice.SliceType.Normal' is mapped to my_slice
>>     instead of the SliceType helper proxy.  Now when you trace state,
>>     the helper proxy's properties are grouped with the parent proxy.
>>     Previously all helper proxy properties were listed at the very
>>     end of the trace, and that was incorrect.
>>
>>
>> On Mon, Jan 24, 2011 at 2:39 PM, Fabian Braennstroem
>> <f.braennstroem at gmx.de <mailto:f.braennstroem at gmx.de>> wrote:
>>
>>    Hello,
>>
>>    thanks for the info!
>>    Is my impression correct, that in version 3.8.1 the python trace
>>    state process is not as 'complete' as using the old state file
>> approach?
>>    For my case setup, e.g. there is not always the correct camera
>>    position and the correct slices...
>>
>>    Best Regards!
>>    Fabian
>>
>>
>>    On 01/24/2011 08:13 PM, David E DeMarle wrote:
>>
>>        That page is ancient.
>>
>>        I think PVFWrap was the predecessor to paraview.simple which
>>        since 3.6
>>        is the standard way to do ParaView python scripting (see python
>>        trace).
>>        The comments about paraview state files being too verbose have been
>>        addressed since then as well.
>>
>>        Or did you mean something else?
>>
>>        David E DeMarle
>>        Kitware, Inc.
>>        R&D Engineer
>>        28 Corporate Drive
>>        Clifton Park, NY 12065-8662
>>        Phone: 518-371-3971 x109
>>
>>
>>
>>        On Mon, Jan 24, 2011 at 2:02 PM, Fabian Braennstroem
>>        <f.braennstroem at gmx.de <mailto:f.braennstroem at gmx.de>>  wrote:
>>
>>
>>            Hi,
>>
>>            I just found this page and wonder, if this will be a new
>>            approach for python
>>            scripting:
>>
>>
>> http://www.paraview.org/ParaView3/index.php/Visualization_Script_Examples#Paraview_Python_Script_with_PVFWrap
>>
>>            In addition, there are comments about the VisIt way... do
>>            you plan something
>>            like this!?
>>
>>            Best Regards!
>>            Fabian
>>            _______________________________________________
>>            Powered by www.kitware.com <http://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
>>
>>
>>    _______________________________________________
>>    Powered by www.kitware.com <http://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/20110124/96e65997/attachment-0001.htm>


More information about the ParaView mailing list