indigo
indigo copied to clipboard
Correctly handle 403 response from GSheets API
Stack trace:
WARNING bulk_creator 226 139990489721672 Error getting data from google sheets for 18yABnIkTo6a5lojc2KtOS69qly5xRg6_fg8hwiMi8u8
Traceback (most recent call last):
File "/app/.heroku/src/indigo/indigo/bulk_creator.py", line 109, in get_spreadsheet_sheets
.get(spreadsheetId=spreadsheet_id)\
File "/app/.heroku/python/lib/python3.6/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
return wrapped(*args, **kwargs)
File "/app/.heroku/python/lib/python3.6/site-packages/googleapiclient/http.py", line 856, in execute
raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 403 when requesting https://sheets.googleapis.com/v4/spreadsheets/18yABnIkTo6a5lojc2KtOS69qly5xRg6_fg8hwiMi8u8?alt=json returned "The caller does not have permission">
2019-10-14 06:51:33,742 ERROR exception 226 139990489721672 Internal Server Error: /places/ke/works/new-batch/
Traceback (most recent call last):
File "/app/.heroku/src/indigo/indigo/bulk_creator.py", line 109, in get_spreadsheet_sheets
.get(spreadsheetId=spreadsheet_id)\
File "/app/.heroku/python/lib/python3.6/site-packages/googleapiclient/_helpers.py", line 130, in positional_wrapper
return wrapped(*args, **kwargs)
File "/app/.heroku/python/lib/python3.6/site-packages/googleapiclient/http.py", line 856, in execute
raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 403 when requesting https://sheets.googleapis.com/v4/spreadsheets/18yABnIkTo6a5lojc2KtOS69qly5xRg6_fg8hwiMi8u8?alt=json returned "The caller does not have permission">
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/.heroku/src/indigo/indigo_app/views/works.py", line 666, in get_form
sheets = self.bulk_creator.get_spreadsheet_sheets(sheet_id)
File "/app/.heroku/src/indigo/indigo/bulk_creator.py", line 114, in get_spreadsheet_sheets
raise ValueError(str(e))
ValueError: <HttpError 403 when requesting https://sheets.googleapis.com/v4/spreadsheets/18yABnIkTo6a5lojc2KtOS69qly5xRg6_fg8hwiMi8u8?alt=json returned "The caller does not have permission">
During handling of the above exception, another exception occurred: