mp_api.core.client.MPRestError: REST query returned with error status code 500

By following the method shown here (Download all POSCARs from MP database), I want to download all the MP structure data. I run the program below:

with MPRester(my_api_key) as mpr:
    docs = mpr.summary.search(fields=['material_id', 'structure'])

After all, I found an error that:

mp_api.core.client.MPRestError: REST query returned with error status code 500 on URL https://api.materialsproject.org/summary/?_limit=1000&_fields=structure%2Cmaterial_id&_skip=15000 with message:
Internal Server Error

It seems ~5% of all data could be downloaded but it stopped there. How could I finish running the code without error?

Hi @Ryotaro_Okabe,

this is likely the same issue as this post from earlier today. We’re working on fixing the issue. Please follow the other thread for updates.

thanks,
Patrick