Edit: solved, the issue was on Google's side. Occurs when requesting a sheet which had diagrams that had invalid intervals in them. Reported bug to Google.
Note: This issue has persisted for more than 2 days. I had it previously but it was automatically resolved after waiting a day. It has since rearisen.
I am currently using the Google Sheets API through Google's python api client. The authentication is OAuth2.0 and I did not change anything significant in my codebase but all of the sudden I am getting 100% error ratio, and it seems like it should be on Google's end. I fear that I am banned from using the API indefinitely, is this the case? My guess is that when I launched the script and immediately cancelled it with ctrl+c because I wanted to run a new version of it caused some issues.
I tried creating another project and using its credentials to make the request and got the same error. Tried having my friend run the script authenticating through his google account and he receives the same error. The independent source code can be found here
About the source code: The get_credentials() (and therefore the authentication) is entirely copied from Google's python quickstart script as seen here https://developers.google.com/sheets/quickstart/python.
Tracebacks:
Traceback (most recent call last):
File "Google_sheets.py", line 164, in <module>
ss=Spreadsheet(SPREADSHEET_ID)
File "Google_sheets.py", line 83, in __init__
spreadsheetId=self.ssId, includeGridData=True).execute()['sheets']}
File "C:\Users\Larsson\AppData\Local\Programs\Python\Python35-32\lib\site-packages\oauth2client\util.py", line 137, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Users\Larsson\AppData\Local\Programs\Python\Python35-32\lib\site-packages\googleapiclient\http.py", line 838, in execute
raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 500 when requesting https://sheets.googleapis.com/v4/spreadsheets/12YdppOoZUNZxhXvcY_cRgfXEfRnR_izlBsF8Sin3rw4?alt=json&includeGridData=true returned "Internal error encountered.">
After retrying shortly after, I get another error:
Traceback (most recent call last):
File "Google_sheets.py", line 164, in <module>
ss=Spreadsheet(SPREADSHEET_ID)
File "Google_sheets.py", line 83, in __init__
spreadsheetId=self.ssId, includeGridData=True).execute()['sheets']}
File "C:\Users\Larsson\AppData\Local\Programs\Python\Python35-32\lib\site-packages\oauth2client\util.py", line 137, in positional_wrapper
return wrapped(*args, **kwargs)
File "C:\Users\Larsson\AppData\Local\Programs\Python\Python35-32\lib\site-packages\googleapiclient\http.py", line 838, in execute
raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 503 when requesting https://sheets.googleapis.com/v4/spreadsheets/12YdppOoZUNZxhXvcY_cRgfXEfRnR_izlBsF8Sin3rw4?includeGridData=true&alt=json returned "The service is currently unavailable.">
Solved, the issue was on Google's side. Occurs when requesting a sheet which had diagrams that had invalid/unselected intervals in them. Reported bug to Google.
Fix by changing all invalid diagrams to valid ranges.