matterverse.ai usage via coding #3257
-
Hi! thanks allot for developing matterverse I try to run the code available at the end of this page (https://matterverse.ai/about). I get error related to depreciation of some methods, after I use the recommended code I still get error, I put an example at the end here. Meanwhile, do you think there is an updated script to query matterverse.ai results? thanks allot #mpr.query({"icsd_ids": 1570}, ["material_id"])
mpr.materials.summary.search({"icsd_ids": 1570}, ["material_id"]) I get: KeyError Traceback (most recent call last)
Cell In[14], line 2
1 #mpr.query({"icsd_ids": 1570}, ["material_id"])
----> 2 mpr.materials.summary.search({"icsd_ids": 1570}, ["material_id"])
207 if isinstance(value, (int, float)):
208 value = (value, value)
209 query_params.update(
210 {
--> 211 f"{min_max_name_dict[param]}_min": value[0],
212 f"{min_max_name_dict[param]}_max": value[1],
213 }
214 )
216 if material_ids:
217 query_params.update({"material_ids": ",".join(validate_ids(material_ids))})
KeyError: 0 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
For that code snippet to work you have to use the old |
Beta Was this translation helpful? Give feedback.
For that code snippet to work you have to use the old
MPRester
(using an old MP API key of length 16), not the new one inmp-api
. I admit it's confusing. We're actively discussing this situation. @shyuep @munrojm