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 =[“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”])

MPRestError : REST query returned with error status code 500 on URL 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?


Hi @casfrueh,

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


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