Unable to use the function mpr.summary.search

Hello,

I’m trying to use mpr.summary.search function to organize a database. When I do something like this "docs = mpr.summary.search(material_ids=[‘mp-754897’]), it will show “pydantic.error_wrappers.ValidationError: 1 validation error for SummaryDoc
has_props
value is not a valid list (type=type_error.list)”.

I’m able to use the function “mpr.materials.get_data_by_id” to get the information. But I’m not able to get the materials properties like formation energy, energy above hull, like what “mpr.summary.search” can do. Is there anyway to get this information from MPid? or am I doing something wrong?

Best,
Jerry

Basically I’m trying to get the data like this.
https://api.materialsproject.org/docs#/Materials%20Summary
but it seems like the summary.search function doesn’t work…

Are you running the latest versions of mp-api and emmet-core?

yeah you’re right. I just notcied the latest version is 0.39 but I’m running 0.35. I’ve tried to upgrade but I can only upgrade to 0.35. Is there any requirement for upgrading to 0.39? Thanks so much for your reply.

It’ll give me a error like this:
ERROR: Could not find a version that satisfies the requirement mp-api==0.39.1 (from versions: 0.2.1, 0.2.2, 0.2.3, 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.5.1, 0.6.0, 0.6.1, 0.7.0, 0.7.1, 0.8.0, 0.9.0, 0.9.1, 0.10.0, 0.10.1, 0.10.2, 0.11.0, 0.11.1, 0.11.2, 0.11.3, 0.11.4, 0.12.0, 0.12.1, 0.12.2, 0.13.0, 0.14.0, 0.14.1, 0.15.0, 0.15.1, 0.16.0, 0.16.1, 0.16.2, 0.16.3, 0.16.4, 0.16.5, 0.17.0, 0.18.0, 0.19.0, 0.20.0, 0.20.1, 0.20.2, 0.20.4, 0.20.5, 0.20.6, 0.21.0, 0.21.1, 0.21.2, 0.21.3, 0.21.4, 0.21.5, 0.21.6, 0.22.0, 0.22.1, 0.22.2, 0.23.0, 0.23.1, 0.23.2, 0.23.3, 0.23.4, 0.23.5, 0.23.6, 0.24.0, 0.24.1, 0.24.2, 0.24.3, 0.24.4, 0.24.5, 0.24.6, 0.24.7, 0.24.8, 0.25.0, 0.25.1, 0.25.2, 0.26.0, 0.26.1, 0.26.2, 0.26.3, 0.26.4, 0.27.0, 0.27.1, 0.27.2, 0.27.3, 0.27.4, 0.27.5, 0.28.1, 0.29.0, 0.29.1, 0.29.2, 0.29.3, 0.29.4, 0.29.5, 0.29.6, 0.29.7, 0.29.8, 0.30.0, 0.30.1, 0.30.2, 0.30.3, 0.30.4, 0.30.5, 0.30.6, 0.30.7, 0.30.8, 0.30.9, 0.30.10, 0.30.11, 0.31.0, 0.31.1, 0.31.2, 0.32.0, 0.32.1, 0.33.0rc1, 0.33.0rc2, 0.33.0rc3, 0.33.0rc4, 0.33.0rc5, 0.33.0rc6, 0.33.0, 0.33.1, 0.33.2, 0.33.3, 0.34.0rc1, 0.34.0rc2, 0.34.0rc3, 0.34.0rc4, 0.34.0rc5, 0.34.0rc6, 0.34.0rc7, 0.34.0, 0.34.1, 0.34.2, 0.34.3, 0.35.1)
ERROR: No matching distribution found for mp-api==0.39.1

You might have to use a newer python version.