# failed to read file using programmable source, help

**URL:** https://discourse.paraview.org/t/failed-to-read-file-using-programmable-source-help/9502
**Category:** ParaView Support
**Created:** [April 23, 2022, 3:16am UTC](https://discourse.paraview.org/t/failed-to-read-file-using-programmable-source-help/9502 "2022-04-23T03:16:51Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![wu\_ying](https://discourse.paraview.org/user_avatar/discourse.paraview.org/wu_ying/32/9035_2.png) [@wu\_ying](https://discourse.paraview.org/u/wu_ying)
#### Post date: [April 23, 2022, 3:16am UTC](https://discourse.paraview.org/t/failed-to-read-file-using-programmable-source-help/9502/1 "2022-04-23T03:16:51Z")

</div>

Hello, community, failed to read file using programmable source, help

ERROR: In C:\glr\builds\paraview\paraview-ci\build\superbuild\paraview\src\VTK\Common\ExecutionModel\vtkDemandDrivenPipeline.cxx, line 760  
vtkPVDataRepresentationPipeline (000001C9BDBEB550): Input for connection index 0 on input port index 0 for algorithm vtkGeometryRepresentationWithFaces(000001C9BCF970C0) is of type vtkTable, but a vtkDataSet is required.

```auto
# Code for 'RequestInformation Script'.
timeSteps = range(10)
def setOutputTimesteps(algorithm, timesteps):
    "helper routine to set timestep information"
    executive = algorithm.GetExecutive()
    outInfo = executive.GetOutputInformation(0)

    outInfo.Remove(executive.TIME_STEPS())
    for timestep in timesteps:
        outInfo.Append(executive.TIME_STEPS(), timestep)

    outInfo.Remove(executive.TIME_RANGE())
    outInfo.Append(executive.TIME_RANGE(), timesteps[0])
    outInfo.Append(executive.TIME_RANGE(), timesteps[-1])

setOutputTimesteps(self, timeSteps)

# Code for 'Script'
def GetUpdateTimestep(algorithm):    
    executive = algorithm.GetExecutive()
    outInfo = executive.GetOutputInformation(0)
    return outInfo.Get(executive.UPDATE_TIME_STEP()) \
              if outInfo.Has(executive.UPDATE_TIME_STEP()) else None
req_time = GetUpdateTimestep(self)

time=req_time

import numpy as np

data = np.genfromtxt("c:/00yf/dh/time"+str(time)+".txt", dtype=None, names=True, delimiter=',', autostrip=True)
for name in data.dtype.names:
   array = data[name]

  output.RowData.append(array, name)

output.GetInformation().Set(output.DATA_TIME_STEP(), req_time)

```
