From [email protected] Mon Mar 18 17:18:10 2013
Probably because in the documentation
the WriteImage() used is a function
and not a method on the view proxy.
>>> WriteImage("/tmp/image.png")
I actually figured this out.
The "servermanager" module requires 3 parameters,
while the "simple" module requires only 1 parameter,
the other are options.
The problem is that different tutorials and books
use either servermanager or simple, so it's easy
to get confused. It seems "simple" is more modern,
but at least in my 3.10 both are supported.
The 2007 paper edition of the paraview user guide
uses "servermanager" exclusively. I'm looking forward
to receiving the 2012 paraview guide, which presumably
will refer to "simple".
Anton
On Thu, Mar 14, 2013 at 11:28 AM, Anton Shterenlikht
<[email protected]>wrote:
> I get this error:
>
> >>> view.WriteImage("z.png")
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File
>
"/usr/local/lib/paraview-3.10/site-packages/paraview/servermanager.py",
> line 331, in __ConvertArgumentsAndCall
> retVal = func(*newArgs)
> TypeError: WriteImage() takes exactly 3 arguments (1 given)
> >>>
>
> The tutorial suggests that just the filename is enough:
>
> http://paraview.org/Wiki/ParaView/Python_Scripting
>
> Anyway, I can see in other examples that the second argument
> is the file format, e.g.:
>
> view.WriteImage("z.png","vtkPNGWriter")
>
> but this gives the same error:
>
> >>> view.WriteImage("z.png","vtkPNGWriter")
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File
>
"/usr/local/lib/paraview-3.10/site-packages/paraview/servermanager.py",
> line 331, in __ConvertArgumentsAndCall
> retVal = func(*newArgs)
> TypeError: WriteImage() takes exactly 3 arguments (2 given)
> >>>
>
> I cannot find what the third argument must be.
>
> Please help
>
> Anton
_______________________________________________
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