nithinmurali / pygsheets

Google Sheets Python API v4
https://pygsheets.readthedocs.io/en/latest
Other
1.51k stars 220 forks source link

AttributeError: 'Worksheet' object has no attribute 'apply_format', same code but suddenly with error #540

Closed LuigiBrito closed 2 years ago

LuigiBrito commented 2 years ago

Describe the bug Code below (a snippet) rans perfectly fine some time ago. Now it doesn't and says

AttributeError: 'Worksheet' object has no attribute 'apply_format'

gsheet = client.open_by_key('somekey')
wsheet = gsheet.add_worksheet(sheet_name)
wsheet.apply_format("G3:G" + str(wsheet_maxrow), cell,
                    'userEnteredValue.formulaValue')

To Reproduce Steps to reproduce the behavior:

gsheet = client.open_by_key('somekey')
wsheet = gsheet.add_worksheet(sheet_name)
wsheet.apply_format("G3:G" + str(wsheet_maxrow), cell,
                    'userEnteredValue.formulaValue')
# see error
AttributeError: 'Worksheet' object has no attribute 'apply_format'

System Information

LuigiBrito commented 2 years ago

Weird enough, installing the staging version as stated here https://github.com/nithinmurali/pygsheets/issues/493 fixed the same issue...