Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

How can I obtain a mass of mp-id's property through ”MPRester()“or ”requsets()“ more quickly? #25

Closed
wangyu-sd opened this issue Nov 8, 2021 · 2 comments

Comments

@wangyu-sd
Copy link

wangyu-sd commented Nov 8, 2021

Dear
I have a list of mp_id which is named as mp_list and is about 40k entries. The code can be formulated as:

for i, mp_id in enumerate(tqdm(mp_list)):
  With open MPRester(API_KEY) as m:
    crystal_info = m.get_doc(mp_id) 

It did work and took about few hours, last month. But when I retried yesterday, it no longer worked, and would take me a about 300+ hours. Besides, when the progress bar reached about 2k/40k, the request was denied. So, I think whether any error ocurred when I need to obtain a large batch of mp_id's data using the code? This problem has been bothering me for days. I would be appreciated if you can give me some advice about it.

@shyuep
Copy link
Member

shyuep commented Nov 8, 2021

This is a question to be posed to the Materials Project feedback team as it concerns their servers. Pls send your question to feedback@materialsproject.org.

@shyuep shyuep closed this as completed Nov 8, 2021
@mkhorton
Copy link
Member

mkhorton commented Nov 8, 2021

Or, preferred, our public discussion @ matsci.org/materials-project Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants