From a5f27008f98c0b322b3d95d436910ffa83dd3b22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mence=20Lesn=C3=A9?= Date: Sat, 17 Aug 2024 18:40:28 +0200 Subject: [PATCH] IWP --- app/app.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/app.py b/app/app.py index 27849df..4e9a3be 100644 --- a/app/app.py +++ b/app/app.py @@ -372,11 +372,14 @@ def _job_name(job_name: str | None) -> str: if getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS'): # Running in PyInstaller - import certifi + import certifi # Hidden import + import importlib.resources # Path the bundle with certifi # See: https://github.com/Azure/azure-iot-sdk-python/issues/991#issuecomment-1118235694 - env["SSL_CERT_FILE"] = certifi.where() + # See: https://github.com/pyinstaller/pyinstaller/issues/7229#issuecomment-1309406736 + with importlib.resources.path("certifi", "cacert.pem") as ca_path: + env["SSL_CERT_FILE"] = str(ca_path) # Run the CLI cli(sys.argv[1:])