materialsproject / api

New API client for the Materials Project
https://materialsproject.github.io/api/
Other
105 stars 33 forks source link

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

Open dembart opened 7 months ago

dembart commented 7 months ago

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'>,

munrojm commented 6 months ago

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

dembart commented 6 months ago

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