gspread-formatting fails to import gspread.models
vaastav opened this issue · comments
Describe the bug
gspread-formatting fails to import gspread.models
Version and Environment
Version of package: Latest version on Pip
Python interpreter: Python 3.6+
OS: Linux
Error being produced on Github Actions
Here is the traceback:
Traceback (most recent call last):
File "fixtures.py", line 6, in
from gspread_formatting import Color, CellFormat, TextFormat, format_cell_ranges, set_frozen
File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/gspread_formatting/init.py", line 3, in
from .functions import *
File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/gspread_formatting/functions.py", line 12, in
from gspread.models import Spreadsheet
ModuleNotFoundError: No module named 'gspread.models'
@vaastav Thank you for reporting the problem! PyPI now has release 1.0.5 that corrects the problem with gspread 5.0.0.
Thanks.
As noted by robin900, make sure that not only gspread is >=5.0.0, but also gspread-formatting is >=1.0.5
(issue was encountered with gspread>5 but gspread-formatting==1.0.3)