Hello, I'm trying to combine criteria and properties in following code. However it says mpr.query method is replace with mpr.summary.search method and I replaced query method with summary and it still throws errors. what am I doing wrong here? Thank you

Code:

with MPRester(bikash) as mpr:
criteria = {“elements”:{“$all”:[‘C’], “nelements”:1}}
properties = [‘material_id’, ‘energy_per_atom’, ‘structure’]
shortC = (mpr.summary.search(criteria, properties))

Error:

KeyError Traceback (most recent call last)
in <cell line: 1>()
2 criteria = {“elements”:{“$all”:[‘C’], “nelements”:1}}
3 properties = [‘material_id’, ‘energy_per_atom’, ‘structure’]
----> 4 shortC = (mpr.summary.search(criteria, properties))

/usr/local/lib/python3.10/dist-packages/mp_api/client/routes/summary.py in search(self, band_gap, chemsys, crystal_system, density, deprecated, e_electronic, e_ionic, e_total, efermi, elastic_anisotropy, elements, energy_above_hull, equilibrium_reaction_energy, exclude_elements, formation_energy, formula, g_reuss, g_voigt, g_vrh, has_props, has_reconstructed, is_gap_direct, is_metal, is_stable, k_reuss, k_voigt, k_vrh, magnetic_ordering, material_ids, n, num_elements, num_sites, num_magnetic_sites, num_unique_magnetic_sites, piezoelectric_modulus, poisson_ratio, possible_species, shape_factor, spacegroup_number, spacegroup_symbol, surface_energy_anisotropy, theoretical, total_energy, total_magnetization, total_magnetization_normalized_formula_units, total_magnetization_normalized_vol, uncorrected_energy, volume, weighted_surface_energy, weighted_work_function, sort_fields, num_chunks, chunk_size, all_fields, fields)
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 }

Please see our documentation about how to use our new API client.