From 052b86bd294dbb886f40649a6792f775cd8b99ca Mon Sep 17 00:00:00 2001 From: Daniel Velazco Date: Mon, 1 Dec 2025 13:57:56 -0800 Subject: [PATCH 1/2] Fix missing warning method in ProgressReporter Add warning() method to ProgressReporter class to fix AttributeError when activities_iterator.py calls self.progress.warning() during sync. --- src/garmy/localdb/progress.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/garmy/localdb/progress.py b/src/garmy/localdb/progress.py index 208530c..4f1125e 100644 --- a/src/garmy/localdb/progress.py +++ b/src/garmy/localdb/progress.py @@ -56,7 +56,11 @@ def task_failed(self, task: str, sync_date: date): def info(self, message: str): """Log info message.""" self.logger.info(message) - + + def warning(self, message: str): + """Log warning message.""" + self.logger.warning(message) + def error(self, message: str): """Log error message.""" self.logger.error(message) From aeba69d12ba0443d426f7aef5ae3ef457aad4e3d Mon Sep 17 00:00:00 2001 From: Daniel Velazco Date: Mon, 1 Dec 2025 13:58:46 -0800 Subject: [PATCH 2/2] Fix MFA prompt not triggering during sync login Pass prompt_mfa callback to AuthClient.login() so users with 2FA enabled are prompted for their MFA code. Previously, prompt_mfa defaulted to None which caused login to silently fail for 2FA accounts. --- src/garmy/localdb/sync.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/garmy/localdb/sync.py b/src/garmy/localdb/sync.py index e71bbe6..a388583 100644 --- a/src/garmy/localdb/sync.py +++ b/src/garmy/localdb/sync.py @@ -43,7 +43,12 @@ def initialize(self, email: str, password: str): from garmy import AuthClient, APIClient auth_client = AuthClient() - auth_client.login(email, password) + auth_client.login( + email, + password, + prompt_mfa=lambda: input("MFA code: "), + ) + self.api_client = APIClient(auth_client=auth_client) self.activities_iterator = ActivitiesIterator(