diff --git a/web/run.py b/web/run.py index 677cd32..5117341 100755 --- a/web/run.py +++ b/web/run.py @@ -132,6 +132,12 @@ PARAMETERS = { } +# ENV ######################################################################### + +environ['SPACEPY'] = CACHE_DIR +environ['CDF_LIB'] = CDF_LIB + + # SETUP FLASK ENGINE ########################################################## app = Flask(__name__, root_path=THIS_DIRECTORY) @@ -896,8 +902,6 @@ def update_spacepy(): """ Importing pydcf will fail if the toolbox is not up to date. """ - environ['SPACEPY'] = CACHE_DIR - environ['CDF_LIB'] = CDF_LIB try: log.info("Updating spacepy's toolbox…") import spacepy.toolbox @@ -1233,6 +1237,9 @@ def download_targets_cdf(targets, inp, started_at, stopped_at): except ImportError as e: log.error("Failed to import pycdf from spacepy : %s" % e) raise + except Exception as e: + log.error("Failed to import pycdf from spacepy : %s" % e) + raise try: cdf_handle = pycdf.CDF(cdf_path, masterpath='') -- libgit2 0.21.2