[Paraview] GetSources() fails with Custom Filters

m.c.wilkins at massey.ac.nz m.c.wilkins at massey.ac.nz
Mon May 31 16:57:14 EDT 2010


Hi,

Perhaps I am doing something wrong, because I am getting different
behaviour to you Utkarsh.

I have not tried the current git-master, just 3.6.2 and 3.8.0.

With 3.8.0 GetSources() only works if I make the custom filter, then
restart paraview and apply it.  If I apply the custom filter
immediately after making it, GetSources() craps out with the KeyError
as below.

With 3.6.2 GetSources() always craps out, regardless of whether I
restart paraview or not.

To make the custom filter I just make two filters, select them both,
go to Tools -> Create Custom Filter, give it a name, then hit Next
Next Finished.  I don't do anything more than that.  Is there some
other step I am missing perhaps?

Thanks

Matt Wilkins

On Mon, May 31, 2010 at 09:17:53AM -0400, Utkarsh Ayachit wrote:
> Matt,
> 
> I just tried the same with current git-master (should be same as 3.8
> as far as python stuff is concerned). It seems to work just fine:
> 
> >>> from paraview.simple import *
> paraview version 3.9.0, Date: 2010-05-21
> >>> GetSources()
> {('Sphere1', '105'): <paraview.servermanager.Sphere object at 0x4c3ffd0>,
>  ('TwoShrinks1', '1111'): <paraview.servermanager.TwoShrinks object at
> 0x4c3fb10>}
> >>>
> 
> Let me know if it doesn't work with  3.8 for you.
> 
> Utkarsh
> 
> 
> On Sun, May 30, 2010 at 9:41 PM,  <m.c.wilkins at massey.ac.nz> wrote:
> >
> > Hi,
> >
> > Under 3.6.2 on linux in the python shell GetSources() fails if there are
> > sources in the pipeline browser that appeared from Custom Filters.  The error
> > is:
> >
> >>>> GetSources()
> > Traceback (most recent call last):
> >  File "<console>", line 1, in <module>
> >  File "/home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/ParaView3Bin/Utilities/VTKPythonWrapping/paraview/simple.py", line 195, in GetSources
> >  File "/home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/ParaView3Bin/Utilities/VTKPythonWrapping/paraview/servermanager.py", line 1493, in GetProxiesInGroup
> >  File "/home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/ParaView3Bin/Utilities/VTKPythonWrapping/paraview/servermanager.py", line 1704, in next
> >  File "/home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/ParaView3Bin/Utilities/VTKPythonWrapping/paraview/servermanager.py", line 2280, in _getPyProxy
> >  File "/home/kitware/ParaView3/Utilities/BuildScripts/ParaView-3.6/ParaView3Bin/Utilities/VTKPythonWrapping/paraview/servermanager.py", line 2339, in _findClassForProxy
> > KeyError: 'Foo'
> >>>>
> >
> > What I am doing is creating a Custom Filter (Foo) by: selecting two filters I
> > have applied, clicking on Create Custom Filter, then taking all the defaults
> > (clicking through Next Next Next, then Finished).  Then I apply that custom
> > filter, then run a GetSources() in the python shell and the above error
> > appears.
> >
> > I friend tried the above with 3.8.0 on Windows with similar results.
> > I don't completely trust he did it right, but he probably did, so the
> > problem is probably not limited to 3.6.2 on linux.
> >
> > Have I done something wrong with my Custom Filter?
> >
> > Thank you very much for any help you can offer.
> >
> > Matt Wilkins
> >
> > _______________________________________________
> > 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
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.paraview.org/mailman/listinfo/paraview
> >


More information about the ParaView mailing list