diff --git a/libs/community/langchain_community/tools/gmail/utils.py b/libs/community/langchain_community/tools/gmail/utils.py index e8bb4d468b3..01a6b774486 100644 --- a/libs/community/langchain_community/tools/gmail/utils.py +++ b/libs/community/langchain_community/tools/gmail/utils.py @@ -89,7 +89,7 @@ def get_gmail_credentials( flow = InstalledAppFlow.from_client_secrets_file( client_secrets_file, scopes ) - creds = flow.run_local_server(port=0) + creds = flow.run_local_server(port=0, open_browser=False) # Save the credentials for the next run with open(token_file, "w") as token: token.write(creds.to_json())