Internal Server Error

I was trying to pull data with the api. I have not had any problems before but today I keep getting an error. I copied my code and the error below:

My code:
from mp_api.client import MPRester
with MPRester(api_key=api_key) as mpr:
docs = mpr.summary.search(fields=[“nsites”, “composition”, “volume”, “symmetry”, “formula_pretty”, “material_id”, “last_updated”,
“structure”, “uncorrected_energy_per_atom”, “energy_per_atom”, “formation_energy_per_atom”, “is_stable”, “theoretical”])

Error:
MPRestError : REST query returned with error status code 500 on URL https://api.materialsproject.org/summary/?_limit=1000&_fields=nsites%2Ccomposition%2Cvolume%2Csymmetry%2Cformula_pretty%2Cmaterial_id%2Clast_updated%2Cstructure%2Cuncorrected_energy_per_atom%2Cenergy_per_atom%2Cformation_energy_per_atom%2Cis_stable%2Ctheoretical&_skip=14000 with message: Internal Server Error

Hi @casfrueh
The error says your API key is lacking in the request. Did you put your API key in MPRester() when you execute it?

Ruoxi

Hi @casfrueh,

thanks for reporting this. I can confirm that this request is failing. We’re investigating and will keep you posted.

thanks,
Patrick

1 Like

Hi @casfrueh (@Ryotaro_Okabe), we’ve just rolled out a fix for this. Please let us know if you’re still experiencing issues. thanks, Patrick