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

**URL:** https://discourse.paraview.org/t/attributeerror-nonetype-object-has-no-attribute-gettuple/8089
**Category:** ParaView Support
**Tags:** vtk, python
**Created:** [September 27, 2021, 4:11pm UTC](https://discourse.paraview.org/t/attributeerror-nonetype-object-has-no-attribute-gettuple/8089 "2021-09-27T16:11:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Muhammad\_Choudhry](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_choudhry/32/7650_2.png) [@Muhammad\_Choudhry](https://discourse.paraview.org/u/Muhammad_Choudhry)
#### Post date: [September 27, 2021, 4:11pm UTC](https://discourse.paraview.org/t/attributeerror-nonetype-object-has-no-attribute-gettuple/8089/1 "2021-09-27T16:11:00Z")

</div>

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](https://discourse.paraview.org/uploads/short-url/2EmOy1nZMF8I7LHzIxFjFDtUMaG.py) (4.0 KB)

---

<div class="post-metadata">

### Author: ![Kenichiro-Yoshimi](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/ecc23a/32.png) [@Kenichiro-Yoshimi](https://discourse.paraview.org/u/Kenichiro-Yoshimi)
#### Post date: [September 27, 2021, 11:58pm UTC](https://discourse.paraview.org/t/attributeerror-nonetype-object-has-no-attribute-gettuple/8089/2 "2021-09-27T23:58:35Z")

</div>

How about changing the line as follows?

```python
x = q_out.GetTuple1(0)[0]

```

---

<div class="post-metadata">

### Author: ![Muhammad\_Choudhry](https://discourse.paraview.org/user_avatar/discourse.paraview.org/muhammad_choudhry/32/7650_2.png) [@Muhammad\_Choudhry](https://discourse.paraview.org/u/Muhammad_Choudhry)
#### Post date: [September 28, 2021, 10:16am UTC](https://discourse.paraview.org/t/attributeerror-nonetype-object-has-no-attribute-gettuple/8089/3 "2021-09-28T10:16:36Z")

</div>

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.
