Featurize_dataframe can't work successfully as .py file in spyder IDE

Hi Sir,

I am glad to find this API few days ago, it is amazing, though I try to explore the function about it.

I found that featurize_dataframe function wouldn’t work as .py file.

Also, I have tested, it is not the problem about pbar. And finally, the same code as .ipynb file can work via Jupyter Notebook.

Could you please fix such bug.

Thank you very much, have a nice day.

Zhizhou Zhang, a PhD candidate from The University of Manchester.

Hello Zhizhou,

Could you be more specific about the bug you are observing?

I haven’t seen any issues between running matminer directly through the Python interpreter as a *.py file vs a Jupyter notebook.

I suspect that the issue could be around Spyder using a different Python environment than the notebook, but we’ll have to see.

Logan

Dear Sir,

I run the featurize_dataframe function in the same environment via jupyter notebook and spyder (4.1.1). There is no error report in spyder, but the simple code just keeps running all day which makes no sense. I assumed the error is from args (pbar) in featurize_dataframe function which requires ipywidgets package just for jupyter not for spyder.

The tips given by Console of Spyder are below:

5}LNX$06241%GWU`NFTVOS

Code is below:

from pymatgen.core.composition import Composition
from matminer.featurizers.base import MultipleFeaturizer
from matminer.featurizers import composition as cf
feature_calculators = MultipleFeaturizer([cf.IonProperty(fast=True),cf.Stoichiometry()])
comp=Composition(“Fe2O3”)
df=feature_calculators.featurize(comp)
print(df)
comp2=Composition(“NaCl”)
print(‘comp2’,comp2)
entries=list([comp,comp2])
df1=feature_calculators.featurize_many(entries)
print(df1)