Skip to content

Commit

Permalink
Give better error message for desidatamodel in zcat wrap
Browse files Browse the repository at this point in the history
  • Loading branch information
akremin committed Nov 26, 2024
1 parent 037ff0c commit 5e3f3cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion py/desispec/scripts/zcatalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,9 @@ def main(args=None):
try:
import desidatamodel
except ImportError:
log.critical('Unable to import desidatamodel, required to add units (try "module load desidatamodel" first)')
log.critical('Unable to import desidatamodel, required to add units.'
+ ' Try "module load desidatamodel" first or use '
+ '--do-not-add-units')
return 1

if args.indir is not None:
Expand Down
4 changes: 3 additions & 1 deletion py/desispec/scripts/zcatalog_wrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ def main(args=None):
try:
import desidatamodel
except ImportError:
log.critical('Unable to import desidatamodel, required to add units (try "module load desidatamodel" first)')
log.critical('Unable to import desidatamodel, required to add units.'
+ ' Try "module load desidatamodel" first or use '
+ '--do-not-add-units')
return 1

## Define filetype based on healpix vs not healpix
Expand Down

0 comments on commit 5e3f3cb

Please sign in to comment.