diff --git a/utils/google_service.py b/utils/google_service.py index 0859cfc..110d27b 100644 --- a/utils/google_service.py +++ b/utils/google_service.py @@ -25,8 +25,11 @@ class GoogleService: creds = Credentials.from_authorized_user_file(token_path, SCOPES) if creds.expired and creds.refresh_token: creds.refresh(Request()) - with open(token_path, "w") as f: - f.write(creds.to_json()) + try: + with open(token_path, "w") as f: + f.write(creds.to_json()) + except OSError: + pass # read-only mount; refreshed creds live in memory self._creds = creds self._calendar = build("calendar", "v3", credentials=creds)