Timeout error when pulling DOS and bandstructure of some materials_id.

Hi,
I have a list of materials_id and I want to obtain their bandstructures and density of state. However, when I query time, I obtained an error like this "MPRestError: REST query returned with error status code 504. Content: 504 Gateway Time-out. The server didn’t respond in time.

Below is the list of mpids and my example code. Would appreciate any input on how I can get the queried properties without timeout.

Thank you!

mpid_list = [‘mp-9770’, ‘mp-675327’, ‘mp-22841’, ‘mp-560798’, ‘mp-560534’, ‘mp-556210’, ‘mp-27997’, ‘mp-568545’, ‘mp-645694’, ‘mp-674412’, ‘mp-510560’, ‘mp-684898’, ‘mp-754084’, ‘mp-673105’, ‘mp-707201’, ‘mp-720380’, ‘mp-866685’, ‘mp-569724’, ‘mp-569739’, ‘mp-684641’, ‘mp-705892’, ‘mp-571637’, ‘mp-568847’, ‘mp-541373’, ‘mp-6268’, ‘mp-866691’, ‘mp-866714’, ‘mp-30590’, ‘mp-30756’, ‘mp-530165’, ‘mp-677305’, ‘mp-531949’, ‘mp-531826’, ‘mp-31506’, ‘mp-560026’, ‘mp-568580’, ‘mp-674499’, ‘mp-570757’, ‘mp-5182’, ‘mp-733876’, ‘mp-560835’, ‘mp-684619’, ‘mp-559737’, ‘mp-975138’, ‘mp-555277’, ‘mp-30652’, ‘mp-672351’, ‘mp-31909’, ‘mp-570884’, ‘mp-30639’, ‘mp-644259’, ‘mp-8792’, ‘mp-676987’, ‘mp-645504’, ‘mp-675015’]

for mpid in mpid_list:
bandstructure = mpr.get_bandstructure_by_material_id(mpid)
dos = mpr.get_dos_by_material_id(mpid)

Hi @Aini_Palizhati, welcome to the forum!

I just wanted to acknowledge your message – this is a known issue, and I’ve encountered it myself, however no immediate fix is planned.

We have a new large batch of higher-quality electronic band structures arriving in the next few months, along with a paper and a new API to go with it, which will not have this issue.

I’ll raise this issue at our next regular meeting, but it’s unlikely we’ll have time to track down and fix the issue with the current API before the release of our new band structures. If this is urgent for your research, let me know and I can see if there’s another way to get you this data.

Best,

Matt

Hello, recently I also met this problem about 540 error.

I want to screen about 3000 data of bandstructure, but there always is this kind of problem.

So I want to ask when the new band structure can be upload in MP, and this problem can be settled.
or if there is another solution for this problem?

Thank you very much

Xue

2020-07-23