Hello, I am a beginner in API. When running the program on the example, I always encounter errors and connection failures. I have tried it once and it was successful. Is it because I have used it multiple times that it has been unable to run


ConnectionError: (‘Connection aborted.’, RemoteDisconnected(‘Remote end closed connection without response’))

Hi @weitengzhang1227,

Have you ensured your api client is up to date? Always a good idea to try a pip install --upgrade mp_api and see if your problem persists.

From your title you mention having used the query multiple times, what are you currently trying? Running the same query multiple times in an interactive environment like a notebook should not cause any trouble for you.

If you are trying to run large numbers of similar queries in parallel this approach is very inefficient and could lead to timeouts on your requests. If this is the case, I recommend trying some of the tips here: Tips for Large Downloads

Thank you for your valuable reply! I have updated my mp_api to version 0.45.2, which should be the latest version available. Just now, my code started running normally again. The same code failed to run yesterday, but when I tried it again just now, it worked. A few days ago, it only succeeded once out of dozens of attempts. I will continue to test the code situation. Thank you again for taking the time to answer my question in your busy schedule. I hope Materials Project will keep getting better and better.