Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

survey simulations tutorial fails with AttributeError: 'Configuration' object has no attribute 'tiles_nogray' #148

Open
forero opened this issue Jun 7, 2022 · 1 comment
Labels

Comments

@forero
Copy link
Member

forero commented Jun 7, 2022

While testing the survey_simulations notebook in the tutorials with kernel 22.2

https://github.com/desihub/tutorials/blob/ddd19ef4dae83c906d6c11659989f82f55e046ff/survey-simulations.ipynb

the following error arises

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/tmp/ipykernel_22331/2401195871.py in <module>
----> 1 tiles = desisurvey.tiles.get_tiles(tiles_file=tiles_file)

/global/common/software/desi/cori/desiconda/20211217-2.0.0/code/desisurvey/0.18.0/lib/python3.9/site-packages/desisurvey/tiles.py in get_tiles(tiles_file, use_cache, write_cache)
    429         log.debug('Using cached tiles for "{}".'.format(tiles_file))
    430     else:
--> 431         tiles = Tiles(tiles_file)
    432         log.info('Initialized tiles from "{}".'.format(tiles_file))
    433         for pname in tiles.programs:

/global/common/software/desi/cori/desiconda/20211217-2.0.0/code/desisurvey/0.18.0/lib/python3.9/site-packages/desisurvey/tiles.py in __init__(self, tiles_file)
     50     def __init__(self, tiles_file=None):
     51         config = desisurvey.config.Configuration()
---> 52         self.nogray = config.tiles_nogray()
     53         bright_allowed_in_dark = getattr(
     54             config, 'bright_allowed_in_dark', None)

AttributeError: 'Configuration' object has no attribute 'tiles_nogray'

what would be the correct fix to that?

@schlafly
Copy link
Contributor

schlafly commented Jun 8, 2022

The issue is that the tutorial is using files from a surveysim run from 2018, and the format has changed somewhat since then. I've put a new run here:
/global/cfs/cdirs/desi/survey/planning/surveysim-tutorial
which may be more likely to work.

Sorry to be dense, but is the recommended way to test this to clone the tutorials repo, load it up in a NERSC juypyter session, and run the commands? I'm not sure I've ever actually used a tutorial before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants