[Paraview] incorrect python tutorial: http://www.paraview.org/Wiki/ParaView/Python/Screenshot ?

Anton Shterenlikht mexas at bristol.ac.uk
Mon Mar 18 09:17:40 EDT 2013


	From utkarsh.ayachit at kitware.com Mon Mar 18 12:58:15 2013

	I've updated the tutorial. You're missing a "CreateRenderView" call
	for pvpython. I am guessing the contributor was using the UI for the
	script.

Thank you.

It seems the same page is available at two URLs:

http://paraview.org/Wiki/Take_a_Screenshot_of_a_VTP_File
http://www.paraview.org/Wiki/ParaView/Python/Screenshot

Thanks

Anton


	On Mon, Mar 18, 2013 at 7:29 AM, Anton Shterenlikht <mexas at bristol.ac.uk> wrote:
	> I tried to reproduce this tutorial with pvpython
	> (paraview 3.10), only I have a *raw file:
	>
	> $ pvpython
	> Python 2.7.3 (default, Jan 15 2013, 08:46:05)
	> [GCC 4.2.1 20070831 patched [FreeBSD]] on freebsd10
	> Type "help", "copyright", "credits" or "license" for more information.
	>>>> from paraview.simple import *
	> paraview version 3.10.1, Date: 2011-01-28
	>>>> import time
	>>>> reader=ImageReader(FilePrefix="z.raw")
	>>>> reader.DataByteOrder=1
	>>>> reader.DataExtent=[1,40,1,40,1,40]
	>>>> reader.DataScalarType=6
	>>>> view = GetActiveView()
	>>>> view.CameraViewUp = [0, 0, 1]
	> Traceback (most recent call last):
	>   File "<stdin>", line 1, in <module>
	> AttributeError: 'NoneType' object has no attribute 'CameraViewUp'
	>>>> view.CameraFocalPoint = [0, 0, 0]
	> Traceback (most recent call last):
	>   File "<stdin>", line 1, in <module>
	> AttributeError: 'NoneType' object has no attribute 'CameraFocalPoint'
	>>>> view.CameraViewAngle = 45
	> Traceback (most recent call last):
	>   File "<stdin>", line 1, in <module>
	> AttributeError: 'NoneType' object has no attribute 'CameraViewAngle'
	>>>> view.CameraPosition = [5,0,0]
	> Traceback (most recent call last):
	>   File "<stdin>", line 1, in <module>
	> AttributeError: 'NoneType' object has no attribute 'CameraPosition'
	>>>>
	> ...
	>
	> Please advise
	>
	> Thanks
	>
	> 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




More information about the ParaView mailing list