Skip to content

Commit c7cec1c

Browse files
authored
fix(community): Fix AttributeError: module 'google.oauth2.service_account' has no attribute 'ServiceCredentials' in utils (#1199)
## Description When trying to instantiate CalendarToolkit, there is an AttributeError raised to a mismatch in aliases. The safe import should still call the original class name instead of the alias. ## Relevant issues N/A ## Type 🐛 Bug Fix ## Note(optional) Discovered using this notebook: https://github.com/langchain-ai/langchain/blob/master/docs/docs/integrations/tools/google_calendar.ipynb
1 parent 4c1661a commit c7cec1c

File tree

1 file changed

+1
-1
lines changed
  • libs/community/langchain_google_community

1 file changed

+1
-1
lines changed

libs/community/langchain_google_community/_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def import_google() -> Tuple[Request, Credentials, ServiceCredentials]:
7979
).Credentials,
8080
guard_import(
8181
module_name="google.oauth2.service_account", pip_name="google-auth"
82-
).ServiceCredentials,
82+
).Credentials,
8383
)
8484

8585

0 commit comments

Comments
 (0)