Sunday, 15 April 2012

"Error generating the Discovery document for this api" when trying to build a drive service, starting 2/14/2013 -



"Error generating the Discovery document for this api" when trying to build a drive service, starting 2/14/2013 -

i intermittently getting error when calling build on drive service. able reproduce simple programme has json credentials stored file.

#!/usr/bin/python import httplib2 import sys apiclient.discovery import build oauth2client.client import credentials json_creds = open('creds.txt', 'r').read() creds = credentials.new_from_json(json_creds) http = httplib2.http() http = creds.authorize(http) try: drive_service = build('drive', 'v2', http=http) except exception: sys.exit(-1)

when run in loop, seeing rather high number of errors, code in loop fails 15-25% of time me.

i=0; while [ $i -lt 100 ]; python jsoncred.py || echo fail ; i=$(( $i + 1 )); done | grep fail | wc -l

now when take same code, , replace 'drive' 'oauth2', code runs without problems

i have confirmed oauth token using valid , have right scopes:

"expires_in": 2258,

"scope": "https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/userinfo.email",

looking @ app logs, seems have started 2/14/2013 1pm pst. did not force new code, wonder if problem api. there bug in api causing ?

google seeing reports of increased error rates discovery document. please retry on 500 error now, , should successful.

one argue should have retry logic phone call anyway, since practice, current levels high, so, sorry that.

update: should fixed.

google-drive-sdk

No comments:

Post a Comment