AttributeError: 'vtkPVServerManagerCorePython.vtkSMInputProperty' object has no attribute 'Port'

Just reproducing first tutorial

>>> from paraview.simple import *
>>> Sphere()
<paraview.servermanager.Sphere object at 0x7f3c192b00d0>
>>> Show()
<paraview.servermanager.GeometryRepresentation object at 0x7f3c192b0fd0>
>>> Render()
<paraview.servermanager.RenderView object at 0x7f3c192b00d0>
>>> Shrink()
<paraview.servermanager.Shrink object at 0x7f3c19274550>
>>> Show()
<paraview.servermanager.UnstructuredGridRepresentation object at 0x7f3c19274f50>
>>> Render()
<paraview.servermanager.RenderView object at 0x7f3c19274550>
>>> shrinksInput = GetProperty("Input")
>>> print shrinksInput
<paraview.servermanager.Sphere object at 0x7f3c192b00d0>
>>> Hide(shrinksInput)
 
And this is what I get

Traceback (most recent call last):

File "<console>", line 1, in <module>

File "C:\Program Files\ParaView 5.7.0\bin\Lib\site-packages\paraview\simple.py", line 539, in Hide

controller.Hide(proxy, proxy.Port, view)

File "C:\Program Files\ParaView 5.7.0\bin\Lib\site-packages\paraview\servermanager.py", line 1279, in __getattr__

return getattr(self.SMProperty, name)

AttributeError: 'vtkPVServerManagerCorePython.vtkSMInputProperty' object has no attribute 'Port'

Any tips?

shrinksInput = GetProperty("Input")

is wrong. Where is this tutorial from ? What are you trying to achieve ?

Well This is a typo from my side, I meant

shrinksInput = GetProperty(“Input”)

Sorry! No Typo! In that case what the tutorial is specifying is incorrect

My bad, this is an error in the ParaView Guide. The script should be :

 Show()
 Render()
 shrink=Shrink()
 Show()
 Render()
 shrinksInput = shrink.Input
 print shrinksInput
 Hide(shrinksInput)

Thank you Mathieu but still very weird! Look

shrinksInput1 = shrink.Input
print(shrinksInput1)
<paraview.servermanager.Sphere object at 0x0000024DA6CF0EC8>

shrinksInput2 = shrink.GetProperty(“Input”)
print(shrinksInput2)
<paraview.servermanager.Sphere object at 0x0000024DA6CF0EC8>

Hide(shrinksInput1)
Hide(shrinksInput2)
Traceback (most recent call last):
File “”, line 1, in
File “C:\Program Files\ParaView 5.7.0\bin\Lib\site-packages\paraview\simple.py”, line 539, in Hide
controller.Hide(proxy, proxy.Port, view)
File “C:\Program Files\ParaView 5.7.0\bin\Lib\site-packages\paraview\servermanager.py”, line 1279, in getattr
return getattr(self.SMProperty, name)
AttributeError: ‘vtkPVServerManagerCorePython.vtkSMInputProperty’ object has no attribute ‘Port’

if you run,

help(shrinksInput1)
help(shrinksInput2)

It will be much clearer why the second one fails.

Thank you! Will you update the manual?

1 Like

I will !