From f5fb0fd9e67f5a6db5ab37bcafa35b4292ac6649 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 2 Nov 2023 20:43:00 +1000 Subject: [PATCH] Fix syncserver failing to run in macOS packaged build Closes #2794 --- qt/aqt/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qt/aqt/__init__.py b/qt/aqt/__init__.py index 6f28d2dd0..8709ac7b3 100644 --- a/qt/aqt/__init__.py +++ b/qt/aqt/__init__.py @@ -19,6 +19,12 @@ except UnicodeEncodeError as exc: # if sync server enabled, bypass the rest of the startup if "--syncserver" in sys.argv: from anki.syncserver import run_sync_server + from anki.utils import is_mac + + from .package import _fix_protobuf_path + + if is_mac and getattr(sys, "frozen", False): + _fix_protobuf_path() # does not return run_sync_server()