[Paraview] error with python state file

Fabian Braennstroem f.braennstroem at gmx.de
Wed May 11 16:28:03 EDT 2011


Hello Pat,


On 05/11/2011 10:12 PM, pat marion wrote:
> Hi Fabian,
>
> Does the answer provided in the last paragraph of this email help?
>
> http://markmail.org/message/sq7dafegnrh7exth
This was obviously a similar problem, but now it is not the trace, but 
the state file in 3.10.1.


> 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.

Both .foam files are bascically the same geometry calculated with just a 
different equation solver... so the structure should be quite similar.
Just commenting outhe the line 186 gives same error for other variables:

[ceplx049] 01__56T_SST_1.7 > pvpython plot.py
vtkPOpenFOAMReader : [ ...........]
Traceback (most recent call last):
   File "plot.py", line 194, in <module>
     DataRepresentation1.ScalarOpacityFunction = a1_p_PiecewiseFunction
   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 ScalarOpacityFunction 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.
[ceplx049] 01__56T_SST_1.7 > pvpython plot.py
vtkPOpenFOAMReader : [ ...........]
Traceback (most recent call last):
   File "plot.py", line 200, in <module>
     DataRepresentation1.SelectMapper = 'Projected tetra'
   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 SelectMapper 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.
[ceplx049] 01__56T_SST_1.7 >

Thanks for your help!
Fabian


>
> Pat
>
> On Wed, May 11, 2011 at 3:40 PM, Fabian Braennstroem
> <f.braennstroem at gmx.de <mailto: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 <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
>
>



More information about the ParaView mailing list