From a000eb86e527e35aac439cdef2c6a927904e2ff6 Mon Sep 17 00:00:00 2001 From: luna Date: Wed, 8 Jul 2026 15:57:01 +0800 Subject: [PATCH] fix: collect certifi data files in PyInstaller build PyInstaller auto-detects Python imports but does not automatically include data files like certifi's cacert.pem. Without this file, the bundled sidecar crashes at startup on HTTPS requests because ssl.create_default_context(cafile=certifi.where()) resolves to a path that does not exist inside the PyInstaller bundle. Co-Authored-By: Claude --- backend/scripts/build_sidecar.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/scripts/build_sidecar.py b/backend/scripts/build_sidecar.py index b08692b..ee2a1be 100644 --- a/backend/scripts/build_sidecar.py +++ b/backend/scripts/build_sidecar.py @@ -93,6 +93,8 @@ def build_binary(output_dir: str | None): "--onedir", "--name", "mercury-backend", + "--collect-all", + "certifi", str(SIDECAR_ENTRY), ], check=True,