You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm doing some work on a sheet that had some protected ranges, so it wouldn't let me add rows. I noticed the rows variable was still increasing even though no rows were actually added to the sheet. See console output bellow:
>>> wks.rows
982
>>> wks.add_rows(1)
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "C:\Python27\lib\site-packages\pygsheets\worksheet.py", line 479, in add_rows
self.resize(rows=self.rows + rows, cols=self.cols)
File "C:\Python27\lib\site-packages\pygsheets\worksheet.py", line 472, in resize
self.link()
File "C:\Python27\lib\site-packages\pygsheets\worksheet.py", line 134, in link
self.client.update_sheet_properties(self.spreadsheet.id, self.jsonSheet['properties'])
File "C:\Python27\lib\site-packages\pygsheets\client.py", line 336, in update_sheet_properties
return self.sh_batch_update(spreadsheet_id, request, None, batch)
File "C:\Python27\lib\site-packages\pygsheets\client.py", line 409, in sh_batch_update
return self._execute_request(spreadsheet_id, final_request, batch)
File "C:\Python27\lib\site-packages\pygsheets\client.py", line 421, in _execute_request
response = request.execute()
File "C:\Python27\lib\site-packages\oauth2client\_helpers.py", line 133, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Python27\lib\site-packages\googleapiclient\http.py", line 844, in execute
raise HttpError(resp, content, uri=self.uri)
HttpError: <HttpError 400 when requesting https://sheets.googleapis.com/v4/spreadsheets/1hm8hqmOU0auL4CKTvzpSLhtabDK9Yd5aDPF_XQHvRqk:batchUpdate?alt=json returned "Invalid requests[0].updateSheetProperties: You are trying to edit a protected cell or object. Please contact the spreadsheet owner to remove protection if you need to edit.">
>>> wks.rows
983
The text was updated successfully, but these errors were encountered:
I'm doing some work on a sheet that had some protected ranges, so it wouldn't let me add rows. I noticed the rows variable was still increasing even though no rows were actually added to the sheet. See console output bellow:
The text was updated successfully, but these errors were encountered: