編集:問題はGoogle側で解決されました。無効な間隔を持つ図があるシートを要求するときに発生します。 Googleに報告されたバグ。GoogleスプレッドシートAPI HttpError 500と503
注:この問題は2日以上続きます。私は以前はそれを持っていましたが、1日待ってから自動的に解決されました。それ以来、それは賢明です。
私は現在、GoogleのPython APIクライアントを通じてGoogle Sheets APIを使用しています。認証はOAuth2.0で、私はコードベースで何も重要な変更を加えませんでしたが、突然私は100%のエラー率を得ています。それがGoogleの目的であるようです。私はAPIを無期限に使用することを禁止されていることを恐れています。私が推測したのは、スクリプトを起動してすぐにCtrl + Cでキャンセルしたことです。なぜなら、新しいバージョンを実行していくつかの問題を引き起こしたかったからです。
私は別のプロジェクトを作成し、その資格情報を使用してリクエストを行い、同じエラーが発生しました。私の友人が自分のGoogleアカウントで認証されたスクリプトを実行するのを試み、彼は同じエラーを受け取ります。独立系source code can be found here
ソースコードについて:https://developers.google.com/sheets/quickstart/pythonのように、get_credentials()(したがって認証)はGoogleのpythonクイックスタートスクリプトから完全にコピーされています。
トレースバック:直後に再試行した後
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.">
、私は別のエラーが表示されます。
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.">