[Paraview] Problem with Pyton-Script: GetDisplayProperties fails...

Stefan Melber Stefan.Melber at DLR.de
Mon Oct 10 08:59:31 EDT 2011


Hi,

i have an problem with an simple  pyton-script and ParaView (v3.12rc2) - 
trying to use "GetDisplayProperties" in the script (below)

try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()

servermanager.LoadState("test.pvsm")
view = GetRenderView()
src = GetActiveSource()

dp = GetDisplayProperties(src)
dp.Visibility = 0


gives an error message:


Traceback (most recent call last):
   File "test.py", line 9, in <module>
     dp = GetDisplayProperties(src)
   File 
"/opt/PARAVIEW_3_12_0_rc2/ParaView-3.12.0-RC2.bin/Utilities/VTKPythonWrapping/site-packages/paraview/simple.py", 
line 189, in GetDisplayProperties
     return GetRepresentation(proxy, view)
   File 
"/opt/PARAVIEW_3_12_0_rc2/ParaView-3.12.0-RC2.bin/Utilities/VTKPythonWrapping/site-packages/paraview/simple.py", 
line 178, in GetRepresentation
     rep = servermanager.GetRepresentation(proxy, view)
   File 
"/opt/PARAVIEW_3_12_0_rc2/ParaView-3.12.0-RC2.bin/Utilities/VTKPythonWrapping/site-packages/paraview/servermanager.py", 
line 1936, in GetRepresentation
     for rep in view.Representations:
AttributeError: 'NoneType' object has no attribute 'Representations'


If i comment out both lines with "dp", everything is fine.

Any ideas what is wrong here?

Best regards and thank you,

      Stefan



More information about the ParaView mailing list