How to create the code for getting the elastic properties?

The following code to sort the database and find the ones with elastic properties is not working. How do I fix this (traceback error)?

docs = mpr.materials.summary.search(
has_props = [HasProps.elasticity], fields=[“material_id”]
)
mpids = [doc.material_id for doc in docs]

The following code works fine for me, can you try pip install mp_api==0.45.13 emmet-core==0.86.0 pydantic==2.12.0 if it’s not working for you?

from mp_api.client import MPRester

with MPRester() as mpr:
    docs = mpr.materials.summary.search(has_props=['elasticity'],fields=['material_id'])
mpids = [doc.material_id for doc in docs]