Hi Edmar,
Is the user signed in to your app when you are seeing this error? The
gdata-python-client requires a current_user so that it knows which
user the auth token belongs to. Without knowing who the current user
is, auth tokens cannot be reused/upgraded to session tokens.
Thank you,
Jeff
On Nov 15, 6:52 am, Edmar <[EMAIL PROTECTED]> wrote:
> My code :
>
> class GdataProxy(webapp.RequestHandler):
> def get(self):
> # Create a client class which will make HTTP requests with
> Google
> Docs server.
> gd_client = gdata.contacts.service.ContactsService()
> if self.request.get("token"):
> parameters = cgi.FieldStorage()
> authsub_token = parameters['token']
> gd_client.auth_token = authsub_token
> gd_client.UpgradeToSessionToken()
>
> else:
> next = 'http://contexthack.appspot.com/proxy'
> scope = 'http://www.google.com/m8/feeds/'
> secure = False
> session = True
> authSubLogin = gd_client.GenerateAuthSubURL(next,
> scope, secure,
> session)
> self.response.out.write('<a href ="'+
> str(authSubLogin) + '">Login</
> a>' )
>
> After Login app engine show this error :
>
> Traceback (most recent call last):
> File "/base/python_lib/versions/1/google/appengine/ext/webapp/
> __init__.py", line 499, in __call__
> handler.get(*groups)
> File "/base/data/home/apps/contexthack/1.329305945994141299/
> main.py", line 89, in get
> gd_client.UpgradeToSessionToken()
> File "/base/data/home/apps/contexthack/1.329305945994141299/gdata/
> service.py", line 601, in UpgradeToSessionToken
> raise NonAuthSubToken
> NonAuthSubToken
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---