[Paraview] GetSources() fails with Custom Filters
Utkarsh Ayachit
utkarsh.ayachit at kitware.com
Thu Jun 3 13:32:45 EDT 2010
I've committed a fix for this.
commit a573d3bafe54d5edf7ce49de9c46e6e91c52392b
Author: Utkarsh Ayachit <utkarsh.ayachit at kitware.com>
Date: Thu Jun 3 13:31:35 2010 -0400
Update python modules when proxy definitions are updated.
Python modules are now updated when new custom proxies or proxies
from plugins
are loaded.
Utkarsh
On Thu, Jun 3, 2010 at 12:58 PM, Utkarsh Ayachit
<utkarsh.ayachit at kitware.com> wrote:
> I was able to reproduce this. The difference was I believe you are
> starting the python shell before creating the custom filter, while I
> was doing it after :). I'll take a look -- have an idea why.
>
> Utkarsh
>
> On Mon, May 31, 2010 at 9:06 PM, <m.c.wilkins at massey.ac.nz> wrote:
>>
>> Hi,
>>
>> I just built paraview from the latest git repo, same as with 3.8.0.
>>
>> OK, so I must be doing something wrong with my Custom Filter. Or did
>> you not try the GetSources() before doing a restart with paraview?
>>
>> Matt Wilkins
>>
>> On Tue, Jun 01, 2010 at 08:57:14AM +1200, m.c.wilkins at massey.ac.nz wrote:
>>>
>>> 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
>>> > >
>>> _______________________________________________
>>> 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
>> _______________________________________________
>> 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