scipy.spatial.distance.mahalanobis return null values for some vectors in python
It is important to include your test cases when you encounter a potential bug. 

Without further information, looking at the formula of Mahanologis distance.
$$\sqrt{(u-v)^TV^{-1}(u-v)}$$
It is possible to obtain an error if $V$ is not positive definite as the input for the square root might be negative.