[Paraview] error with python state file

pat marion pat.marion at kitware.com
Wed May 11 16:12:30 EDT 2011


Hi Fabian,

Does the answer provided in the last paragraph of this email help?

    http://markmail.org/message/sq7dafegnrh7exth


Could you let me know, for each .foam file, what data types the multiblock
dataset contains?  Are the blocks unstructured grid, polydata, other?  You
should be able to avoid the problem by commenting line 186 in your plot.py
file, where ScalarOpacityUnitDistance is assigned.

Pat

On Wed, May 11, 2011 at 3:40 PM, Fabian Braennstroem
<f.braennstroem at gmx.de>wrote:

> Hello,
>
> I am trying to adjust the filename of the python state file when using the
> openfoam reader.
>
>
> I adjusted the FileName entry to read the declared FILE:
>
>
> FILE="/home/gcae504/HOME/scr/ceplx049/scr2/gcae504/Dissertation/3D_Nielsen/OpenFoam/01_SAS_SSTF_URANS/01__56T_SST_1.7/.foam"
>
>
>
> a_foam = OpenFOAMReader( guiName=".foam", Decomposepolyhedra=1,
> CaseType='Decomposed Case', MeshRegions=['internalMesh'],
> Createcelltopointfiltereddata=1, Cachemesh=1, FileName=FILE,
> LagrangianArrays=[], CellArrays=['k', 'nut', 'omega', 'p', 'U'],
> LagrangianpositionsareinOF13binaryformat=0, PointArrays=[], Readzones=0,
> Adddimensionalunitstoarraynames=0, ListtimestepsaccordingtocontrolDict=0 )
>
> This works so fine well, but as soon as I set it to a different path like:
>
>
> FILE="/home/gcae504/HOME/scr/ceplx049/scr2/gcae504/Dissertation/3D_Nielsen/OpenFoam/01_SAS_SSTF_URANS/01__56T_SST_HRV0/Hrv.foam"
>
> I get this error message:
>
>
> [ceplx049] 01__56T_SST_1.7 > pvpython plot.py
> vtkPOpenFOAMReader : [ ...........]
> Traceback (most recent call last):
>  File "plot.py", line 186, in <module>
>    DataRepresentation1.ScalarOpacityUnitDistance = 0.33228207747036353
>  File
> "/home/gcae504/Desktop/ParaView-3.10.1-Linux-x86_64/lib/paraview-3.10/site-packages/paraview/servermanager.py",
> line 207, in __setattr__
>    "to add this attribute.")
> AttributeError: Attribute ScalarOpacityUnitDistance 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 get the 'same' error message with a script which executes the python
> state file and resets the FileName (the FileName is set using sys.argv),
> when I do not define the complete path....
>
> Does anyone know, what I am doing wrong!?
>
> Best Regards!
> Fabian
> _______________________________________________
> 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/20110511/2346e56f/attachment.htm>


More information about the ParaView mailing list