<p>Do you still get an error if you remove the call to Connect() near the top of the script?</p>
<p>Pat</p>
<div class="gmail_quote">On Jan 23, 2012 12:03 PM, &quot;Paul Melis&quot; &lt;<a href="mailto:paul.melis@sara.nl">paul.melis@sara.nl</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
I&#39;m wondering if the behaviour below is a bug. I have a pvbatch test<br>
script that runs fine under PV 3.10.1 and is actually based on an older<br>
PV tutorial:<br>
<br>
paulmlocal@sara11006:~/examples/paraview$ cat pvbatch_sphere.py<br>
# spherepic.py<br>
from paraview.simple import *<br>
<br>
sm = servermanager<br>
sm.Connect()<br>
<br>
sphere = Sphere()<br>
sphere.ThetaResolution = 100<br>
sphere.PhiResolution = 100<br>
<br>
pidscal = ProcessIdScalars(sphere)<br>
<br>
view = sm.CreateRenderView()<br>
rep = Show(pidscal, view)<br>
<br>
nbprocs = sm.ActiveConnection.GetNumberOfDataPartitions()<br>
lt = MakeBlueToRedLT(0, nbprocs-1)<br>
lt.NumberOfTableValues = nbprocs<br>
<br>
rep.LookupTable = lt<br>
rep.ColorAttributeType = &#39;POINT_DATA&#39;<br>
rep.ColorArrayName = &quot;ProcessId&quot;<br>
<br>
bar = CreateScalarBar(LookupTable=lt, Title=&#39;PID&#39;)<br>
<br>
view.Representations.append(bar)<br>
view.ResetCamera()<br>
view.StillRender()<br>
view.WriteImage(&quot;Sphere.0.png&quot;,&quot;vtkPNGWriter&quot;, 0)<br>
<br>
<br>
When running this with the binary distro of 3.12.0 on a Linux x86_64<br>
system I get:<br>
<br>
paulmlocal@sara11006:~/examples/paraview$<br>
~/software/ParaView-3.12.0-Linux-x86_64/bin/pvbatch pvbatch_sphere.py<br>
ERROR: In<br>
/home/kitware/Dashboards/MyTests/ParaView-master/ParaViewCore/ServerImplementation/vtkPVSessionCore.cxx,<br>
line 324<br>
vtkPVSessionCore (0x1a7f560): Attempt to assign existing ID 1.<br>
while processing<br>
Message 0 = Assign<br>
  Argument 0 = id_value {1}<br>
  Argument 1 = vtk_object_pointer {vtkPVSessionCoreInterpreterHelper<br>
(0x2f6b310)}<br>
<br>
<br>
ERROR: In<br>
/home/kitware/Dashboards/MyTests/ParaView-master/ParaViewCore/ServerImplementation/vtkPVSessionCore.cxx,<br>
line 325<br>
vtkPVSessionCore (0x1a7f560): Aborting execution for debugging purposes.<br>
<br>
Aborted (core dumped)<br>
<br>
<br>
<br>
Looking at the stack trace this seems to be something in the<br>
underwater message handling? Should I file a bug report?<br>
<br>
Regards,<br>
Paul<br>
<br>
<br>
<br>
(gdb) bt<br>
#0  0x00007f0e1ce20a75 in *__GI_raise (sig=&lt;value optimized out&gt;) at<br>
../nptl/sysdeps/unix/sysv/linux/raise.c:64<br>
#1  0x00007f0e1ce245c0 in *__GI_abort () at abort.c:92<br>
#2  0x00007f0e2bb5fada in<br>
vtkPVSessionCore::OnInterpreterError(vtkObject*, unsigned long, void*)<br>
() from<br>
/home/paulmlocal/software/ParaView-3.12.0-Linux-x86_64/lib/paraview-3.12/libvtkPVServerImplementation.so<br>
#3  0x00007f0e1e2e3976 in vtkSubjectHelper::InvokeEvent(unsigned long,<br>
void*, vtkObject*) () from<br>
/home/paulmlocal/software/ParaView-3.12.0-Linux-x86_64/lib/paraview-3.12/libvtkCommon.so.pv3.12<br>
#4  0x00007f0e235cacb7 in<br>
vtkClientServerInterpreter::ProcessOneMessage(vtkClientServerStream<br>
const&amp;, int) () from<br>
/home/paulmlocal/software/ParaView-3.12.0-Linux-x86_64/lib/paraview-3.12/libvtkClientServer.so<br>
#5  0x00007f0e235cb0d3 in<br>
vtkClientServerInterpreter::ProcessStream(vtkClientServerStream const&amp;)<br>
() from<br>
/home/paulmlocal/software/ParaView-3.12.0-Linux-x86_64/lib/paraview-3.12/libvtkClientServer.so<br>
#6  0x00007f0e2bb5dd3f in vtkPVSessionCore::vtkPVSessionCore() () from<br>
/home/paulmlocal/software/ParaView-3.12.0-Linux-x86_64/lib/paraview-3.12/libvtkPVServerImplementation.so<br>
#7  0x00007f0e2bb5e63f in vtkPVSessionCore::New() () from<br>
/home/paulmlocal/software/ParaView-3.12.0-Linux-x86_64/lib/paraview-3.12/libvtkPVServerImplementation.so<br>
#8  0x00007f0e2bb5ba56 in vtkPVSessionBase::vtkPVSessionBase() () from<br>
/home/paulmlocal/software/ParaView-3.12.0-Linux-x86_64/lib/paraview-3.12/libvtkPVServerImplementation.so<br>
#9  0x00007f0e2de4e83e in vtkSMSession::vtkSMSession(bool) () from<br>
/home/paulmlocal/software/ParaView-3.12.0-Linux-x86_64/lib/paraview-3.12/libvtkPVServerManager.so<br>
#10 0x00007f0e2de4e96c in vtkSMSession::New() () from<br>
/home/paulmlocal/software/ParaView-3.12.0-Linux-x86_64/lib/paraview-3.12/libvtkPVServerManager.so<br>
#11 0x00007f0e20279fc1 in PyVTKObject_New () from<br>
/home/paulmlocal/software/ParaView-3.12.0-Linux-x86_64/lib/paraview-3.12/libvtkPythonCore.so.pv3.12<br>
#12 0x00007f0e20278394 in PyVTKClass_Call(_object*, _object*, _object*)<br>
() from<br>
/home/paulmlocal/software/ParaView-3.12.0-Linux-x86_64/lib/paraview-3.12/libvtkPythonCore.so.pv3.12<br>
#13 0x00007f0e1d8e3be7 in PyObject_Call (func=0x210cef0, arg=0x1bf0050,<br>
kw=0x0) at Objects/abstract.c:2529<br>
#14 0x00007f0e1d986441 in call_function (f=0x21c5650, throwflag=&lt;value<br>
optimized out&gt;) at Python/ceval.c:4231<br>
#15 PyEval_EvalFrameEx (f=0x21c5650, throwflag=&lt;value optimized out&gt;) at<br>
Python/ceval.c:2666<br>
#16 0x00007f0e1d989f99 in PyEval_EvalCodeEx (co=0x1e475b0,<br>
globals=&lt;value optimized out&gt;, locals=&lt;value optimized out&gt;, args=0x4,<br>
argcount=0, kws=0x1de8cc0, kwcount=0, defs=0x217d9b0, defcount=4,<br>
closure=0x0) at Python/ceval.c:3253<br>
#17 0x00007f0e1d9884e5 in call_function (f=0x1de8b40, throwflag=&lt;value<br>
optimized out&gt;) at Python/ceval.c:4109<br>
#18 PyEval_EvalFrameEx (f=0x1de8b40, throwflag=&lt;value optimized out&gt;) at<br>
Python/ceval.c:2666<br>
#19 0x00007f0e1d989f99 in PyEval_EvalCodeEx (co=0x1d948b0,<br>
globals=&lt;value optimized out&gt;, locals=&lt;value optimized out&gt;, args=0x0,<br>
argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at<br>
Python/ceval.c:3253<br>
#20 0x00007f0e1d98a292 in PyEval_EvalCode (co=0x2a95, globals=0x2a95,<br>
locals=0x6) at Python/ceval.c:667<br>
#21 0x00007f0e1d9ad7b1 in run_mod (fp=0x1dc2970, filename=0x1bef5e0<br>
&quot;pvbatch_sphere.py&quot;, start=&lt;value optimized out&gt;, globals=0x1caed50,<br>
locals=0x1caed50, closeit=1, flags=0x7fff7ae62660) at<br>
Python/pythonrun.c:1346<br>
#22 PyRun_FileExFlags (fp=0x1dc2970, filename=0x1bef5e0<br>
&quot;pvbatch_sphere.py&quot;, start=&lt;value optimized out&gt;, globals=0x1caed50,<br>
locals=0x1caed50, closeit=1, flags=0x7fff7ae62660) at<br>
Python/pythonrun.c:1332<br>
#23 0x00007f0e1d9ada87 in PyRun_SimpleFileExFlags (fp=0x1dc2970,<br>
filename=0x1bef5e0 &quot;pvbatch_sphere.py&quot;, closeit=1, flags=0x7fff7ae62660)<br>
at Python/pythonrun.c:936<br>
#24 0x00007f0e1d9bfb27 in Py_Main (argc=&lt;value optimized out&gt;,<br>
argv=&lt;value optimized out&gt;) at Modules/main.c:599<br>
#25 0x0000000000402152 in ParaViewPython::Run(int, int, char**) ()<br>
#26 0x00007f0e1ce0bc4d in __libc_start_main (main=&lt;value optimized out&gt;,<br>
argc=&lt;value optimized out&gt;, ubp_av=&lt;value optimized out&gt;, init=&lt;value<br>
optimized out&gt;, fini=&lt;value optimized out&gt;, rtld_fini=&lt;value optimized<br>
out&gt;, stack_end=0x7fff7ae627c8) at libc-start.c:226<br>
#27 0x0000000000401cfa in _start () at ../sysdeps/x86_64/elf/start.S:113<br>
_______________________________________________<br>
Paraview-developers mailing list<br>
<a href="mailto:Paraview-developers@paraview.org">Paraview-developers@paraview.org</a><br>
<a href="http://public.kitware.com/mailman/listinfo/paraview-developers" target="_blank">http://public.kitware.com/mailman/listinfo/paraview-developers</a><br>
</blockquote></div>