If your intention is to just clear the pipeline, try this code, copied from the paraview coprocessor template:<br><br>def GetProxiesToDelete():<br>    iter = servermanager.vtkSMProxyIterator()<br>    iter.Begin()<br>    tobedeleted = []<br>
    while not iter.IsAtEnd():<br>      if iter.GetGroup().find(&quot;prototypes&quot;) != -1:<br>         iter.Next()<br>         continue<br>      proxy = servermanager._getPyProxy(iter.GetProxy())<br>      proxygroup = iter.GetGroup()<br>
      iter.Next()<br>      if proxygroup != &#39;timekeeper&#39; and proxy != None and proxygroup.find(&quot;pq_helper_proxies&quot;) == -1 :<br>          tobedeleted.append(proxy)<br><br>    return tobedeleted<br><br># explicitly delete the proxies -- we do it this way to avoid problems with prototypes<br>
tobedeleted = GetProxiesToDelete()<br>while len(tobedeleted) &gt; 0:<br>
   Delete(tobedeleted[0])<br>
   tobedeleted = GetProxiesToDelete()<br><br><br><div class="gmail_quote">On Wed, Sep 15, 2010 at 3:21 PM, pat marion <span dir="ltr">&lt;<a href="mailto:pat.marion@kitware.com">pat.marion@kitware.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">I&#39;m afraid your use case is not well supported.  There is logic in the paraview gui application that ensures a clean disconnect, which includes a hard reset of the python interpreter context.  Using only python modules, there is manual clean up required after a disconnect that is not yet supported.<br>

<br>You might find that your script still works, you&#39;ll just be be spammed with those error messages.  Also, try calling Connect() instead of servermanager.Disconnect(...).  This will disconnect &amp; reconnect a little more cleanly, but still not perfect.<br>
<font color="#888888">
<br>Pat</font><div><div></div><div class="h5"><br><br><br><div class="gmail_quote">On Wed, Sep 15, 2010 at 2:52 PM, logari81 <span dir="ltr">&lt;<a href="mailto:logari81@googlemail.com" target="_blank">logari81@googlemail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
In the meanwhile I have realized that the error occurs only when I<br>
include a Delete() statement in my script. Thus the following very<br>
simple script reproduces the error:<br>
<br>
import sys<br>
sys.path.append(&#39;/usr/lib/paraview&#39;)<br>
from paraview.simple import *<br>
cone = Cone()<br>
Delete(cone)<br>
servermanager.Disconnect(servermanager.ActiveConnection)<br>
<br>
Hopefully someone can explain this behavior.<br>
<br>
Best Regards<br>
<br>
Kostas<br>
<div><div></div><div><br>
<br>
On Wed, 2010-09-15 at 18:59 +0200, logari81 wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; actually I have the same question as in this previous email:<br>
&gt;<br>
&gt; <a href="http://www.paraview.org/pipermail/paraview/2008-March/007506.html" target="_blank">http://www.paraview.org/pipermail/paraview/2008-March/007506.html</a><br>
&gt;<br>
&gt; I use the python interface in an application that I am developing and I<br>
&gt; import paraview with:<br>
&gt;<br>
&gt; from paraview.simple import *<br>
&gt;<br>
&gt; During the import a connection to the builtin server is also established<br>
&gt; silently. Though, in my application I need to clear the pipeline<br>
&gt; occasionally in order to begin with a new output, so I tried<br>
&gt; disconnecting from the server with:<br>
&gt;<br>
&gt; servermanager.Disconnect(servermanager.ActiveConnection)<br>
&gt;<br>
&gt; but I receive the error:<br>
&gt;<br>
&gt; ERROR:<br>
&gt; In /build/buildd/paraview-3.8.0/Servers/Common/vtkProcessModuleConnectionManager.cxx, line 175<br>
&gt; vtkProcessModuleConnectionManager (0x1d33240): Invalid connection ID: 5<br>
&gt;<br>
&gt; This behavior is tested with ParaView 3.8.0 on Ubuntu 10.04.<br>
&gt;<br>
&gt; I would be glad for any hints.<br>
&gt;<br>
&gt; Kind Regards<br>
&gt;<br>
&gt; Kostas<br>
&gt;<br>
<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>