import math


def getdistance(vector1, vector2):
    """
        Accepts two vectors (track.normalizedlist arrays, containing weighted 
        values for each track attribute). Vectors must be the same length.

        Returns the distance between the two vectors, or None if there is an
        error.
    """
    try:
        result = math.sqrt(sum([math.pow(i - j, 2) for i, j in zip(vector1,
                                                            vector2)]))
        return(result)
    except Exception as e:
        print('error in getdistance:\n{}'.format(e))
        return(None)