Using the API to retrieve charge densities, and I'm getting a botocore.exceptions.SSLError
Reproduction
Using mp_api==0.33.3:
from mp_api.client import MPRester
with MPRester(MP_API_KEY) as mpr:
chgcar, taskdoc = mpr.get_charge_density_from_material_id("mp-1000", inc_task_doc=True)
I'm getting the following error:
Traceback (most recent call last):
File "<stdin>", line 2, in <module>
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/mp_api/client/mprester.py", line 1201, in get_charge_density_from_material_id
chgcar = self.charge_density.get_charge_density_from_file_id(latest_doc.fs_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/mp_api/client/routes/charge_density.py", line 110, in get_charge_density_from_file_id
r = self.boto_resource.Object(bucket, f"{obj_prefix}/{url_doc.fs_id}").get()["Body"] # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/boto3/resources/factory.py", line 580, in do_action
response = action(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/boto3/resources/action.py", line 88, in __call__
response = getattr(parent.meta.client, operation_name)(*args, **params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/botocore/client.py", line 530, in _api_call
return self._make_api_call(operation_name, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/botocore/client.py", line 947, in _make_api_call
http, parsed_response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/botocore/client.py", line 970, in _make_request
return self._endpoint.make_request(operation_model, request_dict)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/botocore/endpoint.py", line 119, in make_request
return self._send_request(request_dict, operation_model)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/botocore/endpoint.py", line 202, in _send_request
while self._needs_retry(
^^^^^^^^^^^^^^^^^^
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/botocore/endpoint.py", line 354, in _needs_retry
responses = self._event_emitter.emit(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/botocore/hooks.py", line 412, in emit
return self._emitter.emit(aliased_event_name, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/botocore/hooks.py", line 256, in emit
return self._emit(event_name, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/botocore/hooks.py", line 239, in _emit
response = handler(**kwargs)
^^^^^^^^^^^^^^^^^
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/botocore/retryhandler.py", line 207, in __call__
if self._checker(**checker_kwargs):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/botocore/retryhandler.py", line 284, in __call__
should_retry = self._should_retry(
^^^^^^^^^^^^^^^^^^^
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/botocore/retryhandler.py", line 320, in _should_retry
return self._checker(attempt_number, response, caught_exception)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/botocore/retryhandler.py", line 363, in __call__
checker_response = checker(
^^^^^^^^
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/botocore/retryhandler.py", line 247, in __call__
return self._check_caught_exception(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/botocore/retryhandler.py", line 416, in _check_caught_exception
raise caught_exception
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/botocore/endpoint.py", line 281, in _do_get_response
http_response = self._send(request)
^^^^^^^^^^^^^^^^^^^
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/botocore/endpoint.py", line 377, in _send
return self.http_session.send(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/keeganquigley/anaconda3/envs/materials-project/lib/python3.11/site-packages/botocore/httpsession.py", line 492, in send
raise SSLError(endpoint_url=request.url, error=e)
botocore.exceptions.SSLError: SSL validation failed for https://minio.materialsproject.org/phuck/atomate_chgcar_fs/6022c548b0d3944bf13b5196 [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1002)
Seems like it might be a server-side issue? Thanks for your help!
Using the API to retrieve charge densities, and I'm getting a
botocore.exceptions.SSLError
Reproduction
Using mp_api==0.33.3:
I'm getting the following error:
Seems like it might be a server-side issue? Thanks for your help!