AttributeError: 'NoneType' object has no attribute 'GetTuple'

Hi, please see the attach script I have been using this script from an year now all was working fine since I use openfoam8 because of the interface compression upgrade my script is giving me error below, which I have no clue why? please can anyone help.
Error:
ERROR: In /home/ubuntu/OpenFOAM/ThirdParty-dev/ParaView-5.6.0/VTK/Common/Misc/vtkFunctionParser.cxx, line 1244
vtkFunctionParser (0x55adcbdce3f0): Syntax error: expecting a variable name; see position 18

ERROR: In /home/ubuntu/OpenFOAM/ThirdParty-dev/ParaView-5.6.0/VTK/Common/Misc/vtkFunctionParser.cxx, line 1244
vtkFunctionParser (0x55adcbdce3f0): Syntax error: expecting a variable name; see position 18

Warning: In /home/ubuntu/OpenFOAM/ThirdParty-dev/ParaView-5.6.0/VTK/Filters/Core/vtkArrayCalculator.cxx, line 376
vtkPVArrayCalculator (0x55adcc646f30): An error occurred when parsing the calculator’s function. See previous errors.

Traceback (most recent call last):
File “qh.py”, line 110, in
x = q_out.GetTuple(0)[0]
AttributeError: ‘NoneType’ object has no attribute ‘GetTuple’

qh.py (4.0 KB)

How about changing the line as follows?

x = q_out.GetTuple1(0)[0]
1 Like

Hi, thanks for the reply but the problem is solved… It was my last time step which has the corrupted or nan values basically I just delete that step and the script is running well.