I think you pasted `from astropy.wcs import WCS` here accidentally ... please remove.