From 5e3f3cbd285db8d781bcf39802281a1186c0c952 Mon Sep 17 00:00:00 2001 From: akremin Date: Mon, 25 Nov 2024 17:54:34 -0800 Subject: [PATCH] Give better error message for desidatamodel in zcat wrap --- py/desispec/scripts/zcatalog.py | 4 +++- py/desispec/scripts/zcatalog_wrap.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/py/desispec/scripts/zcatalog.py b/py/desispec/scripts/zcatalog.py index 4dc746c45..2d0b38657 100755 --- a/py/desispec/scripts/zcatalog.py +++ b/py/desispec/scripts/zcatalog.py @@ -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: diff --git a/py/desispec/scripts/zcatalog_wrap.py b/py/desispec/scripts/zcatalog_wrap.py index b1ef2ff03..f75ef5e2e 100755 --- a/py/desispec/scripts/zcatalog_wrap.py +++ b/py/desispec/scripts/zcatalog_wrap.py @@ -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