What steps will reproduce the problem?
I have an OAuth2 decorator:
decorator = OAuth2DecoratorFromClientSecrets(CLIENT_SECRETS, YOUTUBE_READ_WRITE_SCOPE)
... and I sometimes call a function that requires authentication:
playlist_id = youtube_create_playlist(youtube)
... so I prepend it with decorator:
@decorator.oauth_required
def youtube_create_playlist(youtube):
playlists_insert_response = youtube.playlists().insert(
...
→ As expected, when stepping into youtube_create_playlist(), I go through
oauth2client/appengine.py:oauth_required(), then check_oauth(), then
_create_flow(), where at line 674 of appengine.py 1.7.7 we have:
redirect_uri = request_handler.request.relative_url(
self._callback_path) # Usually /oauth2callback
What is the expected output? What do you see instead?
- Expected: getting a redirect_uri
- Instead: GAE throws exception AttributeError: 'Resource' object has no
attribute 'request'. And indeed I can see in my Variables debugging pane that
the request_handler object has no attribute 'request'. Am I doing something
wrong? Is it a bug?
What version of the product are you using? On what operating system?
- GAE 1.7.7
- Python 2.7.4
- Ubuntu 13.04 x64
Please provide any additional information below.
- I'm new to both GAE and python, sorry if the problem lies between my chair
and my keyboard. Please point me things I'm doing awfully wrong.
- Related StackOverflow post:
http://stackoverflow.com/questions/16309873/gae-1-7-7s-oauth2client-appengine-py
-create-flowself-request-handler-return
Original issue reported on code.google.com by ronan.jo...@gmail.com on 30 Apr 2013 at 10:30
Original issue reported on code.google.com by
ronan.jo...@gmail.com
on 30 Apr 2013 at 10:30