bmorris3 / kelp

Photometric phase curves of exoplanets
https://kelp.readthedocs.io/en/latest/
7 stars 2 forks source link

ImportError astropy.config.configuration.update_default_config #40

Closed odemangeon closed 10 months ago

odemangeon commented 10 months ago

Hi,

I have recently installed the new version of kelp using pip and I got the following error at import:

"ImportError: cannot import name 'update_default_config' from 'astropy.config.configuration'"

It appears that update_default_config has been removed from the last version of astropy (6.0.0). As I am not familiar with what this function was doing and how this was used in kelp. I am not sure how the code needs to be changed to take that into account. So I have downgraded my astropy to 5.3.4. You might want to change the requirements or modify the code to adapt to this depreciation.

Best wishes.

bmorris3 commented 10 months ago

Hi @odemangeon, thanks for the note! Do you still have the full traceback? I'll fix this ASAP.

bmorris3 commented 10 months ago

@odemangeon I believe I fixed it – tests are passing on my end and on CI. Let me know if you have any more trouble.

odemangeon commented 10 months ago

You were faster fixing it than me giving you the info you asked. :)

I have to run now, but I will try your fix tomorrow.

Just in case this is the full error trace back. import kelp Traceback (most recent call last): File "", line 1, in File "/anaconda3/envs/tmp/lib/python3.9/site-packages/kelp/init.py", line 6, in from ._astropy_init import # noqa File "**/anaconda3/envs/tmp/lib/python3.9/site-packages/kelp/_astropy_init.py", line 21, in from astropy.config.configuration import ( ImportError: cannot import name 'update_default_config' from 'astropy.config.configuration' (/anaconda3/envs/tmp/lib/python3.9/site-packages/astropy/config/configuration.py)