Raise a ValueError if no nodes got extracted