0

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?

Iguananaut
  • 21,810
  • 5
  • 50
  • 63
nandhos
  • 681
  • 2
  • 16
  • 31

1 Answers1

2

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.

astrofrog
  • 32,883
  • 32
  • 90
  • 131
  • That was all? I removed the file astropy.cfg and left astropy.0.4.cfg and astropy.log. I run and the warning disappear and appear again the file astropy.cfg, but not warning. Thanks – nandhos Jul 21 '14 at 14:08
  • To be clear, the Astropy configuration system was overhauled in v0.4 so any messages like this are to be expected if you have an old config file. See: http://docs.astropy.org/en/stable/config/config_0_4_transition.html#config-0-4-transition – Iguananaut Jul 21 '14 at 19:35
  • At the same time, if you did *not* have an out of date astropy.cfg and you're still seeing a message like this, it's because of a subtle bug that can occur: https://github.com/astropy/astropy/issues/2772 – Iguananaut Jul 21 '14 at 19:38