Saving data as .csv files

I have been trying to use python to get the data stored in the vtp files as you suggested but whenever I use vtk_to_numpy I get the error:

array = vtk_to_numpy(points)
AttributeError: ‘NoneType’ object has no attribute ‘GetDataType’

Could you provide any information on how to fix this?