[Paraview] Apply isovolume filter using Python

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Mon Mar 7 08:49:35 EST 2016


You're using a mix of advanced & simple API which is causing this
issue. Change your code as follows:

<code>

from paraview.simple import Show,Render
from paraview.simple import OpenDataFile
from paraview.simple import IsoVolume

reader = OpenDataFile("/home/metal-machine/Desktop/11.vts")
IsoVolume(reader,'0.25','0.75')

</code>


On Sun, Mar 6, 2016 at 8:03 PM, Arshpreet Singh <arsh840 at gmail.com> wrote:
> I am making a programmable source filter to read date file and apply
> IsoVolume filter but it is producing Error.
>
>
> Following is my Python Code:
>
> <code>
>
> from paraview import servermanager
> from paraview.simple import Show,Render
> from paraview.simple import OpenDataFile
> from paraview.simple import IsoVolume
>
> servermanager.Connect()
> reader = OpenDataFile("/home/metal-machine/Desktop/11.vts")
> IsoVolume(reader,'0.25','0.75')
>
> </code>
>
>
>
>
> The error I got is as follows:
>
> <error>
>
>
> Traceback (most recent call last):
>
> File "<string>", line 19, in <module>
>
> File "<string>", line 8, in RequestData
>
> File "/home/metal-machine/para/lib/paraview-5.0/site-packages/paraview/simple.py",
> line 1529, in CreateObject
>
> raise RuntimeError, "Expecting a proxy as input."
>
> RuntimeError: Expecting a proxy as input.
>
>
>
> </error>
>
> Am I missing something?
>
> --
>
> Thanks
> Arshpreet Singh
>
> I am Sikh boy, Learning by doing and Learning by teaching is my religion.
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds.  Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview


More information about the ParaView mailing list