Preset=magpie for featurizer bug

I would like to create some features using the magpie preset, the Jupiter notebook for bulk_modulus gives this error

IndexError                                Traceback (most recent call last)
<ipython-input-7-f504c83e9c94> in <module>()
      1 from matminer.featurizers.composition import ElementProperty
      2 
----> 3 ep_feat = ElementProperty.from_preset(preset_name="magpie")
      4 df = ep_feat.featurize_dataframe(df, col_id="composition")  # input the "composition" column to the featurizer
      5 df.head()

/anaconda3/lib/python3.6/site-packages/matminer-0.6.2-py3.6.egg/matminer/featurizers/composition.py in from_preset(cls, preset_name)
    173             raise ValueError("Invalid preset_name specified!")
    174 
--> 175         return cls(data_source, features, stats)
    176 
    177     def featurize(self, comp):

/anaconda3/lib/python3.6/site-packages/matminer-0.6.2-py3.6.egg/matminer/featurizers/composition.py in __init__(self, data_source, features, stats)
    102             self.data_source = PymatgenData()
    103         elif data_source == "magpie":
--> 104             self.data_source = MagpieData()
    105         elif data_source == "deml":
    106             self.data_source = DemlData()

/anaconda3/lib/python3.6/site-packages/matminer-0.6.2-py3.6.egg/matminer/utils/data.py in __init__(self)
    213                                           lines[atomic_no - 1].split()]
    214                         else:
--> 215                             prop_value = float(lines[atomic_no - 1])
    216                     except ValueError:
    217                         prop_value = float("NaN")

IndexError: list index out of range

Any ideas what could be the problem?

-Kyle

Hey Kyle,

We have updated the repo to work with the newest pymatgen, which was the root cause of this issue:

Could you try downloading the newest version from github and see if that fixes the issue?

Unfortunately, many of the examples notebooks need to be updated to work with the newest matminer. If you are looking to just get the notebooks to 100% work, download the matminer version listed in the notebook (0.4.5).

Thanks,
Alex

Fixed the issue, thank you Alex!