Can't query piezoelectric data from the materials project database

I’m trying to query piezoelectric data from the materials project database. When I do the same thing for the summary, I get a dictionary of all properties I requested, which I convert to a dataframe after. Here’s the code I use:

rester = MPRester(
    apikey, mute_progress_bars=False, use_document_model=False
)
data = rester.materials.summary.search(
    elements=['O'], num_elements=(2, None),
    fields=[
        'material_id','formula_pretty',"energy_above_hull", 'composition',
        'elements', 'shear_modulus', 'bulk_modulus', 'universal_anisotropy',
        'homogeneous_poisson', 'volume', 'density',  'elements',
        'formula_anonymous', 'n'
    ]
)
df_oxide = pd.DataFrame.from_dict(data)

But when I try doing the exact same thing with piezoelectric properties, the program returns a MPDataDoc list, not a dictionary. Here’s the code I use:

df_list = df_oxide['material_id'].tolist()
piezo = rester.materials.piezoelectric.search(
     material_ids=df_list[0:10000], all_fields=True
)

What am I doing wrong? Any help is appreciated🙏

Hi @Aleksandra_Ermilova,

Are you sure you are using the same instantiated MPRester object? When I copy and paste your code and use the same rester, I have no issues with it returning MPDataDoc objects as use_document_model=False is still honored.

– Jason