Skip to content

Commit

Permalink
add exception escape to defining magpie data dir
Browse files Browse the repository at this point in the history
  • Loading branch information
rjacobs914 committed Apr 12, 2021
1 parent b0ffde4 commit 6f32f91
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mastml/feature_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 6f32f91

Please sign in to comment.