# Can't run documentation example for programmable filters

**URL:** https://discourse.paraview.org/t/cant-run-documentation-example-for-programmable-filters/1702
**Category:** ParaView Support
**Tags:** python
**Created:** [April 19, 2019, 8:59am UTC](https://discourse.paraview.org/t/cant-run-documentation-example-for-programmable-filters/1702 "2019-04-19T08:59:15Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![avalade](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/b5a626/32.png) [@avalade](https://discourse.paraview.org/u/avalade)
#### Post date: [April 19, 2019, 8:59am UTC](https://discourse.paraview.org/t/cant-run-documentation-example-for-programmable-filters/1702/1 "2019-04-19T08:59:15Z")

</div>

I am just trying to run an example from Paraview 5.6.0 guide section 12.4 :

```python
from vtkmodules.vtkCommonDataModel import vtkDataSet
from vtkmodules.util.vtkAlgorithm import VTKPythonAlgorithmBase
from vtkmodules.numpy_interface import dataset_adapter as dsa
# new module for ParaDiew-specific decorators.
from paraview.util.vtkAlgorithm import smproxy, smproperty, smdomain

@smproxy.filter(label =" Half -D Filter ")
@smproperty.input(name =" Input ")
class HalfDFilter(VTKPythonAlgorithmBase):
    # the rest of the code here is unchanged.
    def __init__ (self):
        VTKPythonAlgorithmBase. __init__ (self)

    def RequestData(self, request, inInfo, outInfo):
        # get the first input.
        input0 = dsa.WrapDataObject(vtkDataSet.GetData(inInfo [0]))
        # compute a value.
        data = input0.PointData ["D"] / 2.0
        # add to output
        output = dsa.WrapDataObject(vtkDataSet.GetData(outInfo))
        output.PointData.append(data, "D_half");
        return(1)

```

with D instead of V to fit my data, **which is a 256x256x256 Structered Grid, not a PolyData, maybe that’s the problem…**

**The problem is that the** `append` **function doesn’t actually append the data, just the name !**  
Some outputs :

```auto
    output (BEFORE append) :
    type : <class 'vtkmodules.numpy_interface.dataset_adapter.PolyData'> <class 'vtkmodules.numpy_interface.dataset_adapter.DataSetAttributes'>
    keys : []
    values : <vtkmodules.numpy_interface.dataset_adapter.VTKNoneArray object at 0x7efdc9f1b748>

    data :
    type : <class 'vtkmodules.numpy_interface.dataset_adapter.VTKArray'>
    values : [-0.0003911 -0.00040877 -0.00042751 ... -0.00191144 -0.00189098
     -0.00187079]

    output (AFTER append) :
    type : <class 'vtkmodules.numpy_interface.dataset_adapter.PolyData'> <class 'vtkmodules.numpy_interface.dataset_adapter.DataSetAttributes'>
    keys : ['D_half']
    values : [] 

```

I then got my hands a little bit dirtier and found the source of the `append` function which is in `/usr/lib/python3.7/site-packages/vtkmodules/numpy_interface/dataset_adapter.py` (line 686). Adding some `print` here and there in the function body, I found that I actually have a `AttributeError` while copying the data to the new vtk compliant object. This fails silently since the `except` section only contains a `pass` statement…

I am running Paraview 5.6.0-5 as can be found on Archlinux’s community repositories, and Python 3.7.3-1.

Thx for your help !
