Hi Vic

Thanks a lot. That was the one to get things saved.

But in the next step when I try to use the token with my spreadsheet.service
client I get the following error


self.service_client.token_store
=gdata.gauth.AuthSubToken(tokenSpread.get_token_string(),
['https://spreadsheets.google.com/feeds/'])
AttributeError: 'AuthSubToken' object has no attribute 'get_token_string'


The code I'm trying....
client = gdata.spreadsheet.service.SpreadsheetsService()
gdata.alt.appengine.run_on_appengine(service_client)
token =  token = gdata.gauth.ae_load(current_user.user_id())
client.token_store =tokenSpread
client.auth_token = tokenSpread
client.UpgradeToSessionToken()

feed = self.service_client.GetSpreadsheetsFeed()

Another variant


client.token_store =gdata.gauth.AuthSubToken(token.get_token_string(),
['https://spreadsheets.google.com/feeds/'])

I cant figure out how to add the token . I've tried to figure out which
version the service is using. The "old style" or the new one



On Fri, Dec 10, 2010 at 22:41, Vic Fryzel <[email protected]> wrote:

> Hey Josephine,
>
> Ah, I found the issue.  You're using the "old style" AuthSubToken class,
> which is defined as gdata.auth.AuthSubToken, yet the method you're using
> (ae_save()) uses the "new style" AuthSubToken class, which is defined as
> gdata.gauth.AuthSubToken.  Note the g in gauth.
>
> Replace line 68 in what you sent me with this:
> new_style_token = gdata.gauth.AuthSubToken(token.get_token_string(), ['
> https://spreadsheets.google.com/feeds/'<https://spreadsheets.google.com/feeds/%27>
> ])
> gdata.gauth.ae_save(new_style_token, current_user.user_id())
>
> And you should be good to go.
>
> Thanks,
> -Vic
>



-- 
Co-founder and owner
+46 704 330 764
Cloudspot AB
www.cloudspot.se
Google Apps Authorized Reseller

Reply via email to