Chiral anomaly in a spherical spacetime