From 6f32f9164fd86749fae29b9e074346abd610ed2a Mon Sep 17 00:00:00 2001 From: rjacobs914 Date: Mon, 12 Apr 2021 18:20:54 -0500 Subject: [PATCH] add exception escape to defining magpie data dir --- mastml/feature_generators.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mastml/feature_generators.py b/mastml/feature_generators.py index 3230aa73..c082fda2 100644 --- a/mastml/feature_generators.py +++ b/mastml/feature_generators.py @@ -76,7 +76,10 @@ # locate path to directory containing AtomicNumber.table, AtomicRadii.table AtomicVolume.table, etc # (needs to do it the hard way becuase python -m sets cwd to wherever python is ran from) import mastml -MAGPIE_DATA_PATH = os.path.join(mastml.__path__[0], 'magpie') +try: + MAGPIE_DATA_PATH = os.path.join(mastml.__path__[0], 'magpie') +except: + print('the path to the magpie data files needs to be defined to perform elemental property-based feature generation') class BaseGenerator(BaseEstimator, TransformerMixin):