<div dir="ltr">Probably because in the documentation the WriteImage() used is a function and not a method on the view proxy.<div><br></div><div>
<p style="margin:0px"><span style="font-family:Courier;font-size:13pt;color:rgb(0,0,0)">>>> WriteImage("/tmp/image.png")</span></p></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Mar 14, 2013 at 11:28 AM, Anton Shterenlikht <span dir="ltr"><<a href="mailto:mexas@bristol.ac.uk" target="_blank">mexas@bristol.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I get this error:<br>
<br>
>>> view.WriteImage("z.png")<br>
Traceback (most recent call last):<br>
File "<stdin>", line 1, in <module><br>
File "/usr/local/lib/paraview-3.10/site-packages/paraview/servermanager.py", line 331, in __ConvertArgumentsAndCall<br>
retVal = func(*newArgs)<br>
TypeError: WriteImage() takes exactly 3 arguments (1 given)<br>
>>><br>
<br>
The tutorial suggests that just the filename is enough:<br>
<br>
<a href="http://paraview.org/Wiki/ParaView/Python_Scripting" target="_blank">http://paraview.org/Wiki/ParaView/Python_Scripting</a><br>
<br>
Anyway, I can see in other examples that the second argument<br>
is the file format, e.g.:<br>
<br>
view.WriteImage("z.png","vtkPNGWriter")<br>
<br>
but this gives the same error:<br>
<br>
>>> view.WriteImage("z.png","vtkPNGWriter")<br>
Traceback (most recent call last):<br>
File "<stdin>", line 1, in <module><br>
File "/usr/local/lib/paraview-3.10/site-packages/paraview/servermanager.py", line 331, in __ConvertArgumentsAndCall<br>
retVal = func(*newArgs)<br>
TypeError: WriteImage() takes exactly 3 arguments (2 given)<br>
>>><br>
<br>
I cannot find what the third argument must be.<br>
<br>
Please help<br>
<br>
Anton<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>
</blockquote></div><br></div>