I am having an issue extracting data with the following code (Using PV5.7). SelectPoints() works fine. SelectCells() complains, although I can create an equivalent selection with 'Find Data". The error message is:
( 1.455s) [paraview ] vtkPythonSelector.cxx:76 WARN| vtkPythonSelector (0x5620e4686e60): Could not invoke 'python_selector.execute()'
Error: Failed to evaluate Expression 'RTData <= 100'. The following exception stack should provide additional developer specific information. This typically implies a malformed expression. Verify that the expression is valid.
Traceback (most recent call last):
File "/local/apps/ParaView/5.7/lib/python3.7/site-packages/paraview/detail/python_selector.py", line 79, in execute
maskArray = calculator.compute(inputs, query, ns=elocals)
File "/local/apps/ParaView/5.7/lib/python3.7/site-packages/paraview/detail/calculator.py", line 143, in compute
retVal = eval(expression, globals(), mylocals)
File "<string>", line 1, in <module>
NameError: name 'RTData' is not defined
Error: Failed to evaluate Expression 'RTData <= 100'. The following exception stack should provide additional developer specific information. This typically implies a malformed expression. Verify that the expression is valid.
The code is here:
from paraview.simple import *
w = Wavelet()
w.UpdatePipeline()
w2 = PointDatatoCellData(Input=w)
w2.PassPointData = 1
#w2.ProcessAllArrays = 1
w2.UpdatePipeline()
cdi = w2.GetCellDataInformation()
assert cdi.keys()[0] == 'RTData'
selection=SelectPoints()
selection.QueryString="RTData <= 100"
selection.FieldType = 'POINT'
selection.UpdatePipelineInformation()
# create a new 'Extract Selection'
mySelection = ExtractSelection(Input=w2, Selection=selection)
mySelection.UpdatePipeline()
Show(mySelection)
selection2=SelectCells()
selection2.QueryString="RTData <= 100"
selection2.FieldType = 'CELL'
selection2.UpdatePipelineInformation()
# create a new 'Extract Selection'
mySelection2 = ExtractSelection(Input=w, Selection=selection2)
mySelection2.UpdatePipeline()
Show(mySelection2)