@Makoto Oda I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer.
Issue:
I've configured Azurite HTTPS Setup using mkcert.
I can connect to Azurite from Azure Storage Explorer.
However, I cannot connect to Azurite from Azure Function (Python).
I refer to azure.storage.blob.BlobClient
, and the error message is as follows:
error = ServiceRequestError('[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'
The same code works without HTTPS setup.
Solution:
I further searched, and I found this issue.
When I set %USERPROFILE%\AppData\Local\mkcert\rootCA.pem
to the environment variable REQUESTS_CA_BUNDLE
, I could solve CERTIFICATE_VERIFY_FAILED error.
Please let us know if you have any more questions and we will be glad to assist you further. Thank you!
Remember:
Please accept an answer if correct. Original posters help the community find answers faster by identifying the correct answer. Here is how.
Want a reminder to come back and check responses? Here is how to subscribe to a notification.
@SaiKishor-MSFT
Thank you for your answer.
I'm developing with Windows, pyenv, virtual environment. So, it is not the case to run the command
Install Certificates.command
.I further searched, and I found this issue.
When I set
%USERPROFILE%\AppData\Local\mkcert\rootCA.pem
to the environment variableREQUESTS_CA_BUNDLE
, I could solve CERTIFICATE_VERIFY_FAILED error.