I'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'll just be be spammed with those error messages. Also, try calling Connect() instead of servermanager.Disconnect(...). This will disconnect & reconnect a little more cleanly, but still not perfect.<br>
<br>Pat<br><br><br><div class="gmail_quote">On Wed, Sep 15, 2010 at 2:52 PM, logari81 <span dir="ltr"><<a href="mailto:logari81@googlemail.com">logari81@googlemail.com</a>></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('/usr/lib/paraview')<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 class="h5"><br>
<br>
On Wed, 2010-09-15 at 18:59 +0200, logari81 wrote:<br>
> Hi,<br>
><br>
> actually I have the same question as in this previous email:<br>
><br>
> <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>
><br>
> I use the python interface in an application that I am developing and I<br>
> import paraview with:<br>
><br>
> from paraview.simple import *<br>
><br>
> During the import a connection to the builtin server is also established<br>
> silently. Though, in my application I need to clear the pipeline<br>
> occasionally in order to begin with a new output, so I tried<br>
> disconnecting from the server with:<br>
><br>
> servermanager.Disconnect(servermanager.ActiveConnection)<br>
><br>
> but I receive the error:<br>
><br>
> ERROR:<br>
> In /build/buildd/paraview-3.8.0/Servers/Common/vtkProcessModuleConnectionManager.cxx, line 175<br>
> vtkProcessModuleConnectionManager (0x1d33240): Invalid connection ID: 5<br>
><br>
> This behavior is tested with ParaView 3.8.0 on Ubuntu 10.04.<br>
><br>
> I would be glad for any hints.<br>
><br>
> Kind Regards<br>
><br>
> Kostas<br>
><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>