Search code examples
pythonastropy

Astropy Deprecation Warning


I installed Anaconda distro for python 2.7 (all works fine), then I installed SunPy following SunPy install

To install SunPy’s extra dependancies run:

conda update astropy
pip install suds

To install run:

pip install sunpy

But whem i run something like this:

from astropy.io import fits
file = fits.open("file.fits")
file = file[0].data

I have this warning that did not appears before installing SunPy and updating Astropy

WARNING: AstropyDeprecationWarning: Config parameter 'enabled_record_valued_keyword_cards' in section [io.fits] of the file 'C:\Users\nandhos.astropy\config\astropy.cfg' is deprecated. Use 'enable_record_valued_keyword_cards' in section [fits] instead. [astropy.config.configuration]

Apparently, all works fine, it's only i'd wanna know why appears this message. How do I use the "enable_record_valued_keyword_cards" in section fits intead the other configuration?


Solution

  • The easiest way to get rid of the warning is to simply remove the ~/.astropy/config/astropy.cfg file, if you have not edited it before. This should be fixed in subsequent versions of astropy.