api icon indicating copy to clipboard operation
api copied to clipboard

no validator found for <class 'pymatgen.core.composition.Composition' during import of MPRester

Open dembart opened this issue 2 years ago • 2 comments

import of PropertyDoc from emmet.core.material_property fails due to the RuntimeError: no validator found for <class 'pymatgen.core.composition.Composition'>.

Any ideas how to fix it? I am running code on M1 Mac with Ventura OS

---> 26 from emmet.core.material_property import PropertyDoc 27 from emmet.core.mpid import MPID 28 ... ~/opt/anaconda3/lib/python3.8/site-packages/pydantic/fields.cpython-38-darwin.so in pydantic.fields.ModelField.populate_validators()

~/opt/anaconda3/lib/python3.8/site-packages/pydantic/validators.cpython-38-darwin.so in find_validators()

RuntimeError: no validator found for <class 'pymatgen.core.composition.Composition'>,

dembart avatar Dec 06 '23 12:12 dembart

Which version of emmet-core, mp-api, and pymatgen are you running with?

munrojm avatar Dec 13 '23 19:12 munrojm

emmet-core==0.68.0 mp-api==0.33.3 pymatgen==2023.8.10

dembart avatar Dec 13 '23 20:12 dembart