我有这段代码:
from astropy.io import fits
filename = tkinter.filedialog.askopenfilename()
file = fits.open(filename)
尝试在Python 2.7下运行时,一切正常。但是在Python 3.4下存在这个问题:
WARNING: An exception occurred matching an HDU header to the appropriate HDU type: [astropy.io.fits.hdu.base]
WARNING: The HDU will be treated as corrupted. [astropy.io.fits.hdu.base]
发出此警告后,我无法对我的文件执行操作。任何想法如何处理这个问题?