jobovy / apogee

Tools for dealing with APOGEE data
BSD 3-Clause "New" or "Revised" License
43 stars 25 forks source link

No default dr available for APOGEE_REDUX DR16, need to set it by hand #62

Closed dutry closed 2 years ago

dutry commented 3 years ago

When I try to import apogee.tools.read as apread, It shows the error: OSError: No default dr available for APOGEE_REDUX DR16, need to set it by hand

Two environment variables have been set:

 'SDSS_LOCAL_SAS_MIRROR': '/Users/du/OneDrive/Work/gaia_lyrae_sample/apogee_jobovy/data',
 'RESULTS_VERS': 'l33'

The whole error screenshot:

Screen Shot 2020-12-23 at 11 51 14 AM
jobovy commented 3 years ago

That's weird! There must be something going wrong with the environment variable, because this should work with the current version I think. Could you try

import apogee.tools.path as appath
print(appath._APOGEE_REDUX,appath._DR16REDUX, appath._APOGEE_REDUX == appath._DR16REDUX)

and send the output?

dutry commented 3 years ago
Screen Shot 2020-12-28 at 5 00 41 PM
jobovy commented 3 years ago

That's even weirder, because you don't seem to be able to load the tools submodule, which you seem to have been able to do before (when importing apogee.tools.read). Something may be corrupted about your installation, so the best thing to do might be to wipe the installation and freshly install the latest master branch.

jobovy commented 3 years ago

Did you install with pip? There is an apogee package on pip that's not the same!