# Error connecting points by Programmable Filter

**URL:** https://discourse.paraview.org/t/error-connecting-points-by-programmable-filter/14832
**Category:** ParaView Support
**Created:** [June 12, 2024, 6:54am UTC](https://discourse.paraview.org/t/error-connecting-points-by-programmable-filter/14832 "2024-06-12T06:54:42Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![emgema](https://discourse.paraview.org/user_avatar/discourse.paraview.org/emgema/32/14582_2.png) [@emgema](https://discourse.paraview.org/u/emgema)
#### Post date: [June 12, 2024, 6:54am UTC](https://discourse.paraview.org/t/error-connecting-points-by-programmable-filter/14832/1 "2024-06-12T06:54:42Z")

</div>

I try to connect points (listed in a table) with a Programmable Filter ([script from here](https://stackoverflow.com/questions/22438140/how-to-connect-points-in-paraview)):

```auto
# the single input table this filter is applied to
table = inputs[0]

# print table properties and metrics just for sure
print("table: ", table)
print("table.GetNumberOfRows() = ", table.GetNumberOfRows())

num_rows = table.GetNumberOfRows()

# usual vtk workflow: fill vtkPoints first
vtkpoints = vtk.vtkPoints()
for i in range(0, num_rows):
    vtkpoints.InsertPoint(i,
        table.GetValue(i,13).ToFloat(), #x column
        table.GetValue(i,12).ToFloat(), #y column
        table.GetValue(i,14).ToFloat() #z column
        )
vtkpoints.InsertPoint(i,
        table.GetValue(0,13).ToFloat(), #x column
        table.GetValue(0,12).ToFloat(), #y column
        table.GetValue(0,14).ToFloat() #z column
        )
output.SetPoints(vtkpoints)

# allocate vtkCell, representing single line
# if more lines, use output.Allocate(N_OF_LINES, 1) 
output.Allocate(1, 1) 
vtkpolyline = vtk.vtkPolyLine()
vtkpolyline.GetPointIds().SetNumberOfIds(num_rows)
# enumerate points to include in polyline
for i in range(0,num_rows):
    vtkpolyline.GetPointIds().SetId(i, i)
# assign vtkPolyLine graphical object to created vtkCell
output.InsertNextCell(vtkpolyline.GetCellType(),
                      vtkpolyline.GetPointIds())

```

I get this error message:

_Traceback (most recent call last):_

- File “”, line 22, in \*
- File “”, line 3, in RequestData\*  
_TypeError: ‘NoneType’ object is not subscriptable_  
_ERROR: In vtkTableToPolyData.cxx, line 83_  
_vtkTableToPolyData (0x61dfbabfd540): Failed to locate the columns to use for the point coordinates_

_ERROR: In vtkExecutive.cxx, line 729_  
_vtkPVCompositeDataPipeline (0x61dfbafa7040): Algorithm vtkTableToPolyData (0x61dfbabfd540) returned failure for request: vtkInformation (0x61dfbc0534c0)_

- Debug: Off\*
- Modified Time: 1424465\*
- Reference Count: 1\*
- Registered Events: (none)\*
- Request: REQUEST\_DATA\*
- FROM\_OUTPUT\_PORT: 0\*
- ALGORITHM\_AFTER\_FORWARD: 1\*
- FORWARD\_DIRECTION: 0\*

_Traceback (most recent call last):_

- File “”, line 22, in \*
- File “”, line 3, in RequestData\*  
_TypeError: ‘NoneType’ object is not subscriptable_
- File “”, line 6\*
- for i in range(0, numPoints-1):\*  
_IndentationError: unexpected indent_  
_Traceback (most recent call last):_
- File “”, line 22, in \*  
_NameError: name ‘RequestData’ is not defined_  
_Traceback (most recent call last):_
- File “”, line 22, in \*
- File “”, line 3, in RequestData\*  
_TypeError: ‘NoneType’ object is not subscriptable_

Can you tell me what goes wrong?

I’m using:  
Client Information:  
Version: 5.12.1-1101-g3094ac888d  
VTK Version: 9.3.0-3270-g66096615a1  
Qt Version: 5.15.8  
vtkIdType size: 64bits  
Embedded Python: On  
Python Library Path: /home/emanuel/miniforge3/lib/python3.11  
Python Library Version: 3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 18:53:30) [GCC 12.3.0]  
Python Numpy Support: Off  
Python Matplotlib Support: Off  
Python Testing: Off  
MPI Enabled: On  
Disable Registry: Off  
Test Directory:  
Data Directory:  
SMP Backend: TBB  
SMP Max Number of Threads: 12  
OpenGL Vendor: AMD  
OpenGL Version: 4.6 (Core Profile) Mesa 23.2.1-1ubuntu3.1~22.04.2  
OpenGL Renderer: RENOIR (renoir, LLVM 15.0.7, DRM 3.54, 6.5.0-1023-oem)  
Accelerated filters overrides available: No  
Connection Information:  
Remote Connection: No

---

<div class="post-metadata">

### Author: ![emgema](https://discourse.paraview.org/user_avatar/discourse.paraview.org/emgema/32/14582_2.png) [@emgema](https://discourse.paraview.org/u/emgema)
#### Post date: [June 12, 2024, 8:40am UTC](https://discourse.paraview.org/t/error-connecting-points-by-programmable-filter/14832/2 "2024-06-12T08:40:35Z")

</div>

I got it working. The problem was a wrong python path which led to my Anaconda environment and not to the system python.  
I rebuild paraview using the system python and everything works…

---

<div class="post-metadata">

### Author: ![lastairbender](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/l/9d8465/32.png) [@lastairbender](https://discourse.paraview.org/u/lastairbender)
#### Post date: [July 15, 2024, 6:50pm UTC](https://discourse.paraview.org/t/error-connecting-points-by-programmable-filter/14832/3 "2024-07-15T18:50:19Z")

</div>

Hi, I am facing a similar error in line 729 however, I am unable to interact with the window that shows the error, how can i do that?

 ![image](https://discourse.paraview.org/uploads/default/original/2X/d/dd09bdb14e182c05fd4548228d03468e1236f7ec.png)
