google-code-export / gdata-python-client

Automatically exported from code.google.com/p/gdata-python-client
1 stars 0 forks source link

InsertAlbum with AuthSub produces 500: Internal Server Error #140

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Authenticate with Google using an AuthSub Token
2. Attempt to create an album:
    gd_client = gdata.photos.service.PhotosService()
    gd_client.SetAuthSubToken(profile.token) #profile is defined earlier
    entry = gd_client.InsertAlbum(title='What is this', summary='This is an
album')

What is the expected output? What do you see instead?
 Entry shoud be populated with the new album, but I get a
GooglePhotosException: (500, 'Internal Server Error', '')

What version of the product are you using?
SVN (around the release of 1.1.1)

Please provide any additional information below.

I went through gdata/photos/service.py and found that the 'email' property
is never populated when using AuthSub. I hard-coded the 'email' right
before the Post() call in InsertAlbum() it would work, but it looks like
I'll need to collect the 'email' in some other way. It's a pity it doesn't
get populated when we get the token.

If you're using Google App Engine and have users logging in with their
google accounts you can get it there, but not everyone will have access to
the google account username.

Original issue reported on code.google.com by ben.stoo...@gmail.com on 9 Jul 2008 at 4:04

GoogleCodeExporter commented 9 years ago
According to the documentation, InsertAlbum requires ClientLogin()

http://gdata-python-client.googlecode.com/svn/trunk/pydocs/gdata.photos.service.
html

This breaks web authentication, in my opinion, and should be changed.

Original comment by blh...@gmail.com on 7 Jul 2011 at 2:56

GoogleCodeExporter commented 9 years ago

Original comment by afs...@google.com on 7 Oct 2011 at 12:16