[Paraview] Attribute Error

Paul Edwards paul.m.edwards at gmail.com
Tue Dec 10 17:50:31 EST 2013


It works for me if I set the PV_PLUGIN_PATH to point to the directory where
the point sprite plugin is located.

Alternatively you edit the script to use the "SetPropertyWithName" for the
ones relating to the plugin, e.g.
DataRepresentation1.SetPropertyWithName('ConstantRadius', 0.0121232312)

Regards,
Paul


On 10 December 2013 08:35, <S.Appanaboyina at shell.com> wrote:

>  Hi Sebastien,
>
>
>
> Thanx for your reply,
>
>
>
> Yes, I am using the PointSprite plugin. In order to enable this plugin
> with “pvbatch” I added the following line to the script. But still I get
> the same attribute error.
>
>
>
>
> servermanager.LoadPlugin('/glb/apps/ffre-3rdparty/ParaView/ParaView-4.0.1/lib/paraview-4.0/libPointSprite_Plugin.so')
>
>
>
> I also followed your advice of removing the “ConstantRadius” line from the
> script. But, now I get the same kind of error with the next statement in
> the script.
>
>
>
> Am I doing anything wrong. How do I load a plugin to be used with
> ‘pvbatch’.
>
>
>
> Please help.
>
>
>
> Best Regards,
>
> Sunil
>
>
>
>
>
> *From:* Sebastien Jourdain [mailto:sebastien.jourdain at kitware.com]
> *Sent:* Monday, December 09, 2013 7:59 PM
> *To:* Appanaboyina, Sunil Kumar PTIN-PTT/ICOE
> *Cc:* paraview at paraview.org
> *Subject:* Re: [Paraview] Attribute Error
>
>
>
> Hi Sunil,
>
>
>
> is it possible that you've enabled some plugin when you recorded your
> trace that are not present or enabled at the pvbatch execution time?
>
>
>
> And easy fix could be to remove the line that cause the error.
>
>
>
> DataRepresentation1.ConstantRadius = 0.10583775824451128
>
>
>
> My guess is that propriety on the representation is not defined in the
> general case but may be extended via a plugin.
>
>
>
> Seb
>
>
>
> On Mon, Dec 9, 2013 at 2:48 AM, <S.Appanaboyina at shell.com> wrote:
>
> Hi,
>
>
>
>
>
> I am very new to ParaView and have started using ParaView 4.1. I generated
> a python script using the "Start Trace" and "Stop Trace" method. Now I want
> to run this in batch mode. When I run the same python script using
> "pvbatch" I get the following error. I have included the script below.
> Please help.
>
>
>
>
>
> Thank you very much,
>
> Sunil
>
>
>
>
>
> ------------Error---------------------------
>
> Traceback (most recent call last):
>
>   File "test_410_2.py", line 20, in <module>
>
>     DataRepresentation1.ConstantRadius = 0.10583775824451128
>
>   File
> "/glb/apps/ffre-3rdparty/ParaView/ParaView-4.0.1/lib/paraview-4.0/site-packages/paraview/servermanager.py",
> line 251, in __setattr__
>
>     "to add this attribute.")
>
> AttributeError: Attribute ConstantRadius 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.
>
> ---------------------------------------------------------------------
>
>
>
>
>
>
>
> ------------------------python
> script-------------------------------------------------------------------------------
>
>
>
> from paraview.simple import *
>
> paraview.simple._DisableFirstRenderCameraReset()
>
>
>
> Fluid = XMLPolyDataReader(
> FileName=['/glb/ap/bngsti/proj/ccoe/insap3/2D_progressivewave_toycase/Fluid0991.vtp',
> '/glb/ap/bngsti/proj/ccoe/insap3/2D_progressivewave_toycase/Fluid0992.vtp',
> '/glb/ap/bngsti/proj/ccoe/insap3/2D_progressivewave_toycase/Fluid0993.vtp',
> '/glb/ap/bngsti/proj/ccoe/insap3/2D_progressivewave_toycase/Fluid0994.vtp',
> '/glb/ap/bngsti/proj/ccoe/insap3/2D_progressivewave_toycase/Fluid0995.vtp',
> '/glb/ap/bngsti/proj/ccoe/insap3/2D_progressivewave_toycase/Fluid0996.vtp',
> '/glb/ap/bngsti/proj/ccoe/insap3/2D_progressivewave_toycase/Fluid0997.vtp',
> '/glb/ap/bngsti/proj/ccoe/insap3/2D_progressivewave_toycase/Fluid0998.vtp',
> '/glb/ap/bngsti/proj/ccoe/insap3/2D_progressivewave_toycase/Fluid0999.vtp',
> '/glb/ap/bngsti/proj/ccoe/insap3/2D_progressivewave_toycase/Fluid1000.vtp']
> )
>
>
>
> AnimationScene1 = GetAnimationScene()
>
> Fluid.PointArrayStatus = ['Density', 'Pressure', 'Velocitylacement']
>
>
>
> AnimationScene1.EndTime = 9.0
>
> AnimationScene1.PlayMode = 'Snap To TimeSteps'
>
>
>
> RenderView1 = GetRenderView()
>
> DataRepresentation1 = Show()
>
> DataRepresentation1.ConstantRadius = 0.10583775824451128
>
> DataRepresentation1.EdgeColor = [0.0, 0.0, 0.50000762951094835]
>
> DataRepresentation1.PointSpriteDefaultsInitialized = 1
>
> DataRepresentation1.Texture = []
>
> DataRepresentation1.RadiusRange = [0.0, 0.10583775824451128]
>
>
>
> RenderView1.CenterOfRotation = [5.8816560222767293, 0.17167776415590197,
> 0.0]
>
>
>
> a3_Velocitylacement_PVLookupTable = GetLookupTableForArray(
> "Velocitylacement", 3, NanColor=[0.25, 0.0, 0.0],
> RGBPoints=[3.9815157949476304e-05, 0.23000000000000001,
> 0.29899999999999999, 0.754, 0.38799442741086698, 0.70599999999999996,
> 0.016, 0.14999999999999999], VectorMode='Magnitude',
> ColorSpace='Diverging', ScalarRangeInitialized=1.0 )
>
>
>
> a3_Velocitylacement_PiecewiseFunction = CreatePiecewiseFunction()
>
>
>
> RenderView1.CameraPosition = [5.8590496605322775, 0.16414231024108439,
> 15.27905334719394]
>
> RenderView1.CameraClippingRange = [15.126262813722001, 15.50823914740185]
>
> RenderView1.InteractionMode = '3D'
>
> RenderView1.CameraFocalPoint = [5.8590496605322775, 0.16414231024108439,
> 0.0]
>
> RenderView1.CameraParallelScale = 5.8744171209670162
>
> RenderView1.CenterOfRotation = [5.8590496605322775, 0.16414231024108439,
> 0.0]
>
>
>
> DataRepresentation1.ColorArrayName = 'Velocitylacement'
>
> DataRepresentation1.Texture = []
>
> DataRepresentation1.MaxPixelSize = 4.0
>
> DataRepresentation1.LookupTable = a3_Velocitylacement_PVLookupTable
>
> DataRepresentation1.Representation = 'Point Sprite'
>
> DataRepresentation1.RadiusRange = [0.0, 0.105838]
>
> DataRepresentation1.RenderMode = 'Texture'
>
> DataRepresentation1.InterpolateScalarsBeforeMapping = 0
>
>
>
> Render()
>
>
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>
> _______________________________________________
> 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
>
>
>
> _______________________________________________
> 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/20131210/0ec84091/attachment-0001.htm>


More information about the ParaView mailing list