Its really strange it took me several tries of doing the same thing to get the
error. Just to make sure its not any typo, I used python trace to get the
script I attached to this e-mail (test.py). As I understand it should run no
problem in the python shell. I highlight the data set (STSone) in the pipeline
and ran the script and still get
Traceback (most recent call last):
File "<string>", line 6, in <module>
TypeError: 'GradientOfUnstructuredDataSet' object is not callable
On a side note I'm getting this:
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setBrush: Painter not active
QPainter::end: Painter not active, aborted
What is this error? It pops up periodically...
--
Janusz
________________________________
From: Andy Bauer [[email protected]]
Sent: August 9, 2012 16:54
To: Janusz Michalik
Cc: Dray, Colan; [email protected]
Subject: Re: [Paraview] BUG?: Paraview 3.14.1 Linux 64-bit --> can not call
GradientsOfUnstructuredDataSet through python script
I'm able to get the GradientOfUnstructuredDataSet filter through the GUI's
python interpretor so I'm not sure what's causing your problem. Could you share
the script?
I am able to cause problems if I don't have an active filter/source when
creating the GradientOfUnstructuredDataSet filter since it complains, as it
should, that there isn't a proper input for it.
Andy
On Wed, Aug 8, 2012 at 8:23 AM, Janusz Michalik
<[email protected]<mailto:[email protected]>> wrote:
Sorry, in the e-mail I misspelled it. I do use:
GradientOfUnstructuredDataSet()
as the error indicates; it is not related to the spelling. After I sent out the
first e-mail I tried Paraview 3.14.0 Linux 64-bit and it works, so for what I
need this is fine. I think it is a bug that needs to be fixed in 3.14.1, if it
hasn't already been fixed in the developers version.
________________________________
From: Dray, Colan [[email protected]<mailto:[email protected]>]
Sent: August 8, 2012 14:16
To: Janusz Michalik
Subject: RE: [Paraview] BUG?: Paraview 3.14.1 Linux 64-bit --> can not call
GradientsOfUnstructuredDataSet through python script
GradientOfUnstructuredDataSet
GradientsOfUnstructuredDatSet()
There’s a spelling discrepancy between the two: missing “A” in data, and extra
“S” after gradient. Could that be the issue?
-Colan
From: [email protected]<mailto:[email protected]>
[mailto:[email protected]<mailto:[email protected]>] On
Behalf Of Janusz Michalik
Sent: Wednesday, August 08, 2012 5:35 AM
To: [email protected]<mailto:[email protected]>
Subject: Re: [Paraview] BUG?: Paraview 3.14.1 Linux 64-bit --> can not call
GradientsOfUnstructuredDataSet through python script
Hi all,
I switched from Paraview 3.12.0 to 3.14.1 Linux 64-bit and have the following
error:
Traceback (most recent call last):
File "<string>", line 6, in <module>
TypeError: 'GradientOfUnstructuredDataSet' object is not callable
when I try to take the gradients of the velocity by calling:
GradientsOfUnstructuredDatSet(). This worked in 3.12.0, did something change?
Is there a quick fix for this? Please let me know. I would go back to the old
version except that the numpy eig functions return 0+0i for any matrix I throw
at it (so another bug which I assume won't be fixed since its an older version).
Best,
Janusz
_______________________________________________
Powered by www.kitware.com<http://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
try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()
STSone_xmf = GetActiveSource()
GradientOfUnstructuredDataSet3 = GradientOfUnstructuredDataSet()
GradientOfUnstructuredDataSet3.ScalarArray = ['POINTS', 'pressure']
GradientOfUnstructuredDataSet3.ScalarArray = ['POINTS', 'velocity']
RenderView1 = GetRenderView()
DataRepresentation1 = GetDisplayProperties(STSone_xmf)
GradientOfUnstructuredDataSet2 = FindSource("GradientOfUnstructuredDataSet2")
DataRepresentation3 = GetDisplayProperties(GradientOfUnstructuredDataSet2)
DataRepresentation4 = Show()
DataRepresentation4.Opacity = 1.0
DataRepresentation4.EdgeColor = [0.0, 0.0, 0.0]
DataRepresentation4.SelectionPointFieldDataArrayName = 'pressure'
DataRepresentation4.DiffuseColor = [0.0, 0.0, 0.0]
DataRepresentation4.ScalarOpacityUnitDistance = 0.20852579096516402
DataRepresentation4.AmbientColor = [0.0, 0.0, 0.0]
DataRepresentation4.CubeAxesColor = [0.0, 0.0, 0.0]
DataRepresentation4.BackfaceDiffuseColor = [0.0, 0.0, 0.0]
DataRepresentation4.ScaleFactor = 1.8
DataRepresentation4.Representation = 'Surface'
a1_pressure_PVLookupTable = GetLookupTableForArray( "pressure", 1 )
DataRepresentation4.ScalarOpacityFunction = []
DataRepresentation4.ColorArrayName = 'pressure'
DataRepresentation4.LookupTable = a1_pressure_PVLookupTable
Render()
_______________________________________________
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