[Paraview] error with python state file

Fabian Braennstroem f.braennstroem at gmx.de
Wed May 11 15:40:47 EDT 2011


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


More information about the ParaView mailing list