with MPRester(API_KEY) as mpr:
docs = mpr.materials.summary.search(is_stable=True, fields=[“material_id”,“volume”,“energy_per_atom”,“energy_above_hull”,“is_stable”,“is_metal”]) #efermi=(0,10),is_stable=True,
mpids = [doc.material_id for doc in docs]
Could not download the property values. I am getting the following error:
WARNING:urllib3.connectionpool:Retrying (Retry(total=2, connect=3, read=2, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Read timed out. (read timeout=20)”)’: /materials/summary/?is_stable=True&_limit=1000&_fields=material_id%2Cvolume%2Cenergy_per_atom%2Cenergy_above_hull%2Cis_stable%2Cis_metal&_skip=13000
WARNING:urllib3.connectionpool:Retrying (Retry(total=2, connect=3, read=2, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Read timed out. (read timeout=20)”)’: /materials/summary/?is_stable=True&_limit=1000&_fields=material_id%2Cvolume%2Cenergy_per_atom%2Cenergy_above_hull%2Cis_stable%2Cis_metal&_skip=14000
WARNING:urllib3.connectionpool:Retrying (Retry(total=2, connect=3, read=2, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Read timed out. (read timeout=20)”)’: /materials/summary/?is_stable=True&_limit=1000&_fields=material_id%2Cvolume%2Cenergy_per_atom%2Cenergy_above_hull%2Cis_stable%2Cis_metal&_skip=15000
WARNING:urllib3.connectionpool:Retrying (Retry(total=2, connect=3, read=2, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Read timed out. (read timeout=20)”)’: /materials/summary/?is_stable=True&_limit=1000&_fields=material_id%2Cvolume%2Cenergy_per_atom%2Cenergy_above_hull%2Cis_stable%2Cis_metal&_skip=16000
WARNING:urllib3.connectionpool:Retrying (Retry(total=2, connect=3, read=2, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Read timed out. (read timeout=20)”)’: /materials/summary/?is_stable=True&_limit=1000&_fields=material_id%2Cvolume%2Cenergy_per_atom%2Cenergy_above_hull%2Cis_stable%2Cis_metal&_skip=17000
WARNING:urllib3.connectionpool:Retrying (Retry(total=2, connect=3, read=2, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Read timed out. (read timeout=20)”)’: /materials/summary/?is_stable=True&_limit=1000&_fields=material_id%2Cvolume%2Cenergy_per_atom%2Cenergy_above_hull%2Cis_stable%2Cis_metal&_skip=18000
WARNING:urllib3.connectionpool:Retrying (Retry(total=2, connect=3, read=2, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Read timed out. (read timeout=20)”)’: /materials/summary/?is_stable=True&_limit=1000&_fields=material_id%2Cvolume%2Cenergy_per_atom%2Cenergy_above_hull%2Cis_stable%2Cis_metal&_skip=19000
WARNING:urllib3.connectionpool:Retrying (Retry(total=2, connect=3, read=2, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Read timed out. (read timeout=20)”)’: /materials/summary/?is_stable=True&_limit=1000&_fields=material_id%2Cvolume%2Cenergy_per_atom%2Cenergy_above_hull%2Cis_stable%2Cis_metal&_skip=20000
WARNING:urllib3.connectionpool:Retrying (Retry(total=1, connect=3, read=1, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Read timed out. (read timeout=20)”)’: /materials/summary/?is_stable=True&_limit=1000&_fields=material_id%2Cvolume%2Cenergy_per_atom%2Cenergy_above_hull%2Cis_stable%2Cis_metal&_skip=17000
WARNING:urllib3.connectionpool:Retrying (Retry(total=1, connect=3, read=1, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Read timed out. (read timeout=20)”)’: /materials/summary/?is_stable=True&_limit=1000&_fields=material_id%2Cvolume%2Cenergy_per_atom%2Cenergy_above_hull%2Cis_stable%2Cis_metal&_skip=18000
WARNING:urllib3.connectionpool:Retrying (Retry(total=1, connect=3, read=1, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Read timed out. (read timeout=20)”)’: /materials/summary/?is_stable=True&_limit=1000&_fields=material_id%2Cvolume%2Cenergy_per_atom%2Cenergy_above_hull%2Cis_stable%2Cis_metal&_skip=19000
WARNING:urllib3.connectionpool:Retrying (Retry(total=1, connect=3, read=1, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Read timed out. (read timeout=20)”)’: /materials/summary/?is_stable=True&_limit=1000&_fields=material_id%2Cvolume%2Cenergy_per_atom%2Cenergy_above_hull%2Cis_stable%2Cis_metal&_skip=20000
WARNING:urllib3.connectionpool:Retrying (Retry(total=0, connect=3, read=0, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Read timed out. (read timeout=20)”)’: /materials/summary/?is_stable=True&_limit=1000&_fields=material_id%2Cvolume%2Cenergy_per_atom%2Cenergy_above_hull%2Cis_stable%2Cis_metal&_skip=17000
WARNING:urllib3.connectionpool:Retrying (Retry(total=0, connect=3, read=0, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Read timed out. (read timeout=20)”)’: /materials/summary/?is_stable=True&_limit=1000&_fields=material_id%2Cvolume%2Cenergy_per_atom%2Cenergy_above_hull%2Cis_stable%2Cis_metal&_skip=18000
WARNING:urllib3.connectionpool:Retrying (Retry(total=0, connect=3, read=0, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Read timed out. (read timeout=20)”)’: /materials/summary/?is_stable=True&_limit=1000&_fields=material_id%2Cvolume%2Cenergy_per_atom%2Cenergy_above_hull%2Cis_stable%2Cis_metal&_skip=19000
WARNING:urllib3.connectionpool:Retrying (Retry(total=0, connect=3, read=0, redirect=None, status=None)) after connection broken by ‘ReadTimeoutError(“HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Read timed out. (read timeout=20)”)’: /materials/summary/?is_stable=True&_limit=1000&_fields=material_id%2Cvolume%2Cenergy_per_atom%2Cenergy_above_hull%2Cis_stable%2Cis_metal&_skip=20000
TimeoutError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, body, headers, retries, timeout, chunked, response_conn, preload_content, decode_content, enforce_content_length)
536 try:
→ 537 response = conn.getresponse()
538 except (BaseSSLError, OSError) as e:
31 frames
TimeoutError: The read operation timed out
The above exception was the direct cause of the following exception:
ReadTimeoutError Traceback (most recent call last)
ReadTimeoutError: HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Read timed out. (read timeout=20)
The above exception was the direct cause of the following exception:
MaxRetryError Traceback (most recent call last)
MaxRetryError: HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Max retries exceeded with url: /materials/summary/?is_stable=True&_limit=1000&_fields=material_id%2Cvolume%2Cenergy_per_atom%2Cenergy_above_hull%2Cis_stable%2Cis_metal&_skip=17000 (Caused by ReadTimeoutError(“HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Read timed out. (read timeout=20)”))
During handling of the above exception, another exception occurred:
ConnectionError Traceback (most recent call last)
ConnectionError: HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Max retries exceeded with url: /materials/summary/?is_stable=True&_limit=1000&_fields=material_id%2Cvolume%2Cenergy_per_atom%2Cenergy_above_hull%2Cis_stable%2Cis_metal&_skip=17000 (Caused by ReadTimeoutError(“HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Read timed out. (read timeout=20)”))
During handling of the above exception, another exception occurred:
MPRestError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/mp_api/client/core/client.py in _query_resource(self, criteria, fields, suburl, use_document_model, parallel_param, num_chunks, chunk_size, timeout)
423
424 except RequestException as ex:
→ 425 raise MPRestError(str(ex))
426
427 def _submit_requests(
MPRestError: HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Max retries exceeded with url: /materials/summary/?is_stable=True&_limit=1000&_fields=material_id%2Cvolume%2Cenergy_per_atom%2Cenergy_above_hull%2Cis_stable%2Cis_metal&_skip=17000 (Caused by ReadTimeoutError(“HTTPSConnectionPool(host=‘api.materialsproject.org’, port=443): Read timed out. (read timeout=20)”))