Hi,
sorry if there is a dumb question, but I'm pretty puzzled:
so I'm using google drive sdk and oauth decorator with my request handler
I built a service object
decorator = OAuth2Decorator(
client_id=ClIENT_ID,
client_secret=CLIENT_SECRET,
scope='https://www.googleapis.com/auth/drive')
service = build('drive', 'v2')
and decorate my handler
@decorator.oauth_required
def get(self):
.....
in the get method, I tried to use drive sdk to create a new file. This is
where I get confused, if I use *decorator.http() *as argument of *execute*method
res = service.files().insert(
body=body
).execute(*decorator.http()*)
It gives error on the execute line
return self.credentials.authorize(httplib2.Http())
AttributeError: 'NoneType' object has no attribute 'authorize'
But if I extract *http* object first and then pass it to the *execute*
method
* http = decorator.http()*
res = service.files().insert(
body=body
).execute(*http=http*)
it works fine. Aren't they exact same thing?!?!
And also why do I keep getting
WARNING 2014-02-07 06:04:59,223 util.py:129] execute() takes at most 1
positional argument (2 given)
Looking at the source of execute, its signature is execute(self,
http=None), so it does take one argument right?!
Thanks for the help.
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.