Skip to content

Commit

Permalink
Update gspread_client.py (#82)
Browse files Browse the repository at this point in the history
Inside google, we  are removing support for `from gspread import gspread`
  • Loading branch information
sbagri authored Oct 11, 2023
1 parent 125c436 commit 923d372
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions google/generativeai/notebook/gspread_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,10 @@
_gspread_import_error: Exception | None = None
try:
# pylint: disable-next=g-import-not-at-top
from gspread import gspread
except (ImportError, ModuleNotFoundError):
try:
# pylint: disable-next=g-import-not-at-top
import gspread
except ImportError as e:
_gspread_import_error = e
gspread = None
import gspread
except ImportError as e:
_gspread_import_error = e
gspread = None

# Base class of exceptions that gspread.open(), open_by_url() and open_by_key()
# may throw.
Expand Down

0 comments on commit 923d372

Please sign in to comment.