I was trying to pull data with the API through Robocrystallographer. I have not had any problems before but since yesterdayI keep getting an error. Here are the code and the error:
Code snippet:
from mp_api.client import MPRester
mp_api_key = get_mp_api_key()
with MPRester(api_key=mp_api_key) as mpr:
query = mpr.materials.robocrys.search(keywords=["perovskite"])
Error:
MPRestError: REST query returned with error status code 500 on URL https://api.materialsproject.org/materials/robocrys/text_search/?keywords=perovskite&_limit=100 with message: Response Internal Server Error
The API works fine if I use the summary.search
method, e.g.:
with MPRester(api_key=mp_api_key) as mpr:
query = mpr.materials.summary.search(material_ids="mp-1009")
I have already tried upgrading mp-api
to the latest release (0.45.1), and requested a new API key, but the problem persists.
Does anyone know the reason and have a fix for this?
Thank you
~ Giulio