Extract field data from .vtu file

I have a problem trying to extract data from a .vtu file.
I have the file and I would like to do some post-processing, in particular I would like to write .npy files for the grid and some variables of interest. I past here the part of the code.

import vtk
from vtk.util import numpy_support
from vtk.util.numpy_support import vtk_to_numpy
import numpy as np

reader = vtk.vtkXMLUnstructuredGridReader()
reader.SetPointArrayStatus(“H”, 1)


outline of the dataset

get_polydata = vtk.vtkGeometryFilter()

outline = vtk.vtkExtractEdges()

outline_mapper = vtk.vtkPolyDataMapper()

outline_actor = vtk.vtkActor()
outline_actor.GetProperty().SetColor(0.5, 1.0, 0.5)

output = reader.GetOutput()
potential = output.GetPointData().GetArray(“density”)
array = potential.GetData()
density = vtk_to_numpy(array)
print density
Traceback (most recent call last):

File “”, line 29, in
array = potential.GetData()

AttributeError: ‘NoneType’ object has no attribute ‘GetData’

What can I do to extract the field?

Thanks a lot in advance