This should fix the problems on Python 3. This forced me to finally go through much of astropy.io.fits and make it at least *importable* under Python 3, since the only places the wcs module was having issues was where it imports from io.fits.