4 messages in com.googlegroups.google-picasa-data-api[PWA API] Re: Internal Server Error o...| From | Sent On | Attachments |
|---|---|---|
| nicodotti2 | 15 Jul 2008 20:01 | |
| nicodotti2 | 15 Jul 2008 20:04 | |
| nicodotti2 | 16 Jul 2008 08:07 | |
| Jeff Fisher (Google) | 18 Jul 2008 14:51 |
| Subject: | [PWA API] Re: Internal Server Error on Create Album![]() |
|---|---|
| From: | nicodotti2 (nico...@gmail.com) |
| Date: | 07/16/2008 08:07:02 AM |
| List: | com.googlegroups.google-picasa-data-api |
Ok, I'm desperate! I really need to understand why this isn't working using auth sub but does work using client login! I can also create photos to already defined albums, query, etc.,etc., all using the same photos service object with the auth sub token set, just not create albums!!! Here's some more code PLEASE HELP!!!
photos_service = gdata.photos.service.PhotosService(); photos_service.ClientLogin('nico...@gmail.com',MYPASSWORD)
entry = photos_service.InsertAlbum(title='New album', summary='This is an
album')
photos_service2 = gdata.photos.service.PhotosService();
photos_service2.auth_token = 'CMLLo-euHRDs9_RC' # ok so you know have my auth
token!!! I don't care just please help!!!
entry = photos_service2.InsertAlbum(title='New album2', summary='This is an
album2')
Traceback (most recent call last): File "<pyshell#79>", line 1, in <module> entry = photos_service2.InsertAlbum(title='New album2', summary='This is an album2') File "/usr/lib/python2.5/site-packages/gdata/photos/service.py", line 362, in InsertAlbum raise GooglePhotosException(e.args[0]) GooglePhotosException: (500, 'Internal Server Error', '')
photos_service2.debug = 'true'
entry = photos_service2.InsertAlbum(title='New album2', summary='This is an
album2')
connect: (picasaweb.google.com, 80) send: 'POST /data/feed/api/user/None HTTP/1.1\r\nHost: picasaweb.google.com\r\nAccept-Encoding: identity\r\nUser-Agent: None GData-Python/1.1.1\r\nContent-Length: 785\r\nContent-Type: application/ atom+xml\r\nAuthorization: AuthSub token=CMLLo-euHRDs9_RC\r\n\r\n' send: '<?xml version=\'1.0\' encoding=\'UTF-8\'?>\n<ns0:entry xmlns:ns0="http://www.w3.org/2005/Atom"><ns0:category scheme="http:// schemas.google.com/g/2005#kind" term="http://schemas.google.com/photos/ 2007#album" /><ns1:group xmlns:ns1="http://search.yahoo.com/mrss/" /
<ns0:summary type="text">This is an album2</ns0:summary><ns0:title
type="text">New album2</ns0:title><ns1:where xmlns:ns1="http:// www.georss.org/georss"><ns2:Point xmlns:ns2="http://www.opengis.net/ gml"><ns2:pos /></ns2:Point></ns1:where><ns1:timestamp xmlns:ns1="http://schemas.google.com/photos/2007">1216220521020</ ns1:timestamp><ns1:commentingEnabled xmlns:ns1="http:// schemas.google.com/photos/2007">true</ ns1:commentingEnabled><ns1:access xmlns:ns1="http://schemas.google.com/ photos/2007">public</ns1:access></ns0:entry>' reply: 'HTTP/1.1 500 Internal Server Error\r\n' header: Set-Cookie: _rtok=uSqKC-ZscwMA; Path=/
header: Set-Cookie: S=photos_html=4PHrgrb-lsF-KxnC0tAHJg; Domain=.google.com; Path=/
header: Content-Type: text/html; charset=UTF-8
header: Transfer-Encoding: chunked
header: Date: Wed, 16 Jul 2008 15:00:54 GMT
header: Cache-control: private, must-revalidate, max-age=0
header: Server: GFE/1.3
header: Connection: Close
Traceback (most recent call last): File "<pyshell#82>", line 1, in <module> entry = photos_service2.InsertAlbum(title='New album2', summary='This is an album2') File "/usr/lib/python2.5/site-packages/gdata/photos/service.py", line 362, in InsertAlbum raise GooglePhotosException(e.args[0]) GooglePhotosException: (500, 'Internal Server Error', '')
But now watch, I can get a feed (actually I can also create photos, etc.,etc, but for proof purposes this should suffice):
feed = photos_service2.GetUserFeed()
connect: (picasaweb.google.com, 80) send: 'GET /data/feed/api/user/default?kind=album HTTP/1.1\r\nHost: picasaweb.google.com\r\nAccept-Encoding: identity\r\nUser-Agent: None GData-Python/1.1.1\r\nContent-Type: application/atom+xml\r \nAuthorization: AuthSub token=CMLLo-euHRDs9_RC\r\n\r\n' reply: 'HTTP/1.1 200 OK\r\n' header: Set-Cookie: _rtok=tJ6b-QNnHXM3; Path=/
header: Set-Cookie: S=photos_html=-s44l3vGAIbhsTCcLc1jqA; Domain=.google.com; Path=/
header: Content-Type: application/atom+xml; charset=UTF-8
header: Cache-Control: max-age=0, must-revalidate, no-transform
header: GData-Version: 1.0
header: Last-Modified: Wed, 16 Jul 2008 15:01:43 GMT
header: Transfer-Encoding: chunked
header: Date: Wed, 16 Jul 2008 15:01:43 GMT
header: Server: GFE/1.3
print feed
<?xml version='1.0' encoding='UTF-8'?> <ns0:feed xmlns:ns0="http://www.w3.org/2005/Atom"><ns1:quotacurrent xmlns:ns1="http://schemas.google.com/photos/2007">316279</ ns1:quotacurrent><ns1:user xmlns:ns1="http://schemas.google.com/photos/ 2007">nicodotti2</ns1:user><ns1:nickname xmlns:ns1="http:// schemas.google.com/photos/2007">nicodotti</ns1:nickname><ns0:category scheme="http://schemas.google.com/g/2005#kind" term="http:// schemas.google.com/photos/2007#user" /><ns0:id>http:// picasaweb.google.com/data/feed/api/user/default</ns0:id><ns0:generator uri="http://picasaweb.google.com/" version="1.00">Picasaweb</ ns0:generator><ns1:startIndex xmlns:ns1="http://a9.com/-/spec/ opensearchrss/1.0/">1</ns1:startIndex><ns1:maxPhotosPerAlbum xmlns:ns1="http://schemas.google.com/photos/2007">500</ ns1:maxPhotosPerAlbum><ns0:icon>http://lh3.ggpht.com/nicodotti2/ AAAA6uzo5cI/AAAAAAAAAAA/ooMrvSCqDi8/s64-c/nicodotti2.jpg</ ns0:icon><ns1:quotalimit xmlns:ns1="http://schemas.google.com/photos/ 2007">1073741824</ns1:quotalimit><ns0:subtitle type="text" /
<ns1:thumbnail xmlns:ns1="http://schemas.google.com/photos/
2007">http://lh3.ggpht.com/nicodotti2/AAAA6uzo5cI/AAAAAAAAAAA/ ooMrvSCqDi8/s64-c/nicodotti2.jpg</ ns1:thumbnail><ns0:author><ns0:name>nicodotti</ ns0:name><ns0:uri>http://picasaweb.google.com/nicodotti2</ns0:uri></ ns0:author><ns0:link href="http://picasaweb.google.com/data/feed/api/ user/nicodotti2" rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" /><ns0:link href="http:// picasaweb.google.com/data/feed/api/user/nicodotti2" rel="http:// schemas.google.com/g/2005#post" type="application/atom+xml" /
<ns0:link href="http://picasaweb.google.com/nicodotti2"
rel="alternate" type="text/html" /><ns0:link href="http:// picasaweb.google.com/s/c/bin/slideshow.swf? host=picasaweb.google.com&RGB=0x000000&feed=http%3A%2F %2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2Fnicodotti2%3Falt %3Drss" rel="http://schemas.google.com/photos/2007#slideshow" type="application/x-shockwave-flash" /><ns0:link href="http:// picasaweb.google.com/data/feed/api/user/nicodotti2?start- index=1&max-results=1000&kind=album" rel="self" type="application/atom+xml" /><ns0:updated>2008-07-16T15:01:43.265Z</ ns0:updated><ns1:totalResults xmlns:ns1="http://a9.com/-/spec/ opensearchrss/1.0/">3</ns1:totalResults><ns1:itemsPerPage xmlns:ns1="http://a9.com/-/spec/opensearchrss/1.0/">1000</ ns1:itemsPerPage><ns0:title type="text">nicodotti2</ns0:title></ ns0:feed>
PLEASE HELP!!!
On Jul 15, 8:04 pm, nicodotti2 <nico...@gmail.com> wrote:
I should mention that the above picasa_service was instantiated with auth token like:
picasa_service = gdata.photos.service.PhotosService()
picasa_service.auth_token = 'CMLLo-euHRDsXXXX' where XXXX is to obfuscate my
real token ;)
On Jul 15, 8:01 pm, nicodotti2 <nico...@gmail.com> wrote:
I can create an album using the client login but can't seem to do this using the auth sub token method. I have a valid session token and can successfully query a feed but no can create album. Here's an interactive example with debug = true:
picasa_service.debug = 'true' picasa_service.GetUserFeed()
connect: (picasaweb.google.com, 80) send: 'GET /data/feed/api/user/default?kind=album HTTP/1.1\r\nHost: picasaweb.google.com\r\nAccept-Encoding: identity\r\nUser-Agent: None GData-Python/1.1.1\r\nContent-Type: application/atom+xml\r \nAuthorization: AuthSub token=CMLLo-euHRDs9_RC\r\n\r\n' reply: 'HTTP/1.1 200 OK\r\n' header: Set-Cookie: _rtok=TFaILLrciTwV; Path=/
header: Set-Cookie: S=photos_html=fZMlNnpa3TB4-ciUxREnLw; Domain=.google.com; Path=/
header: Content-Type: application/atom+xml; charset=UTF-8
header: Cache-Control: max-age=0, must-revalidate, no-transform
header: GData-Version: 1.0
header: Last-Modified: Wed, 16 Jul 2008 02:55:47 GMT
header: Transfer-Encoding: chunked
header: Date: Wed, 16 Jul 2008 02:55:47 GMT
header: Server: GFE/1.3
<gdata.photos.UserFeed object at 0x8824e6c> ... ... --------- Please note that I've printed the content out successfully but omitting to save space --------
picasa_service.InsertAlbum('MyTitle','MySummary')
connect: (picasaweb.google.com, 80)
send: 'POST /data/feed/api/user/None HTTP/1.1\r\nHost:
picasaweb.google.com\r\nAccept-Encoding: identity\r\nUser-Agent: None
GData-Python/1.1.1\r\nContent-Length: 774\r\nContent-Type: application/
atom+xml\r\nAuthorization: AuthSub token=CMLLo-euHRDs9_RC\r\n\r\n'
send: '<?xml version=\'1.0\' encoding=\'UTF-8\'?>\n<ns0:entry
xmlns:ns0="http://www.w3.org/2005/Atom"><ns0:category scheme="http://
schemas.google.com/g/2005#kind" term="http://schemas.google.com/photos/
2007#album" /><ns1:group xmlns:ns1="http://search.yahoo.com/mrss/"
/><ns0:summary type="text">MySummary</ns0:summary><ns0:title
type="text">MyTitle</ns0:title><ns1:where
xmlns:ns1="http://www.georss.org/georss"><ns2:Point
xmlns:ns2="http://www.opengis.net/
gml"><ns2:pos /></ns2:Point></ns1:where><ns1:timestamp
xmlns:ns1="http://schemas.google.com/photos/2007">1216177053210</
ns1:timestamp><ns1:commentingEnabled xmlns:ns1="http://
schemas.google.com/photos/2007">true</
ns1:commentingEnabled><ns1:access xmlns:ns1="http://schemas.google.com/
photos/2007">public</ns1:access></ns0:entry>'
reply: 'HTTP/1.1 500 Internal Server Error\r\n'
header: Set-Cookie: _rtok=uFWIjI3vhRrw; Path=/
header: Set-Cookie: S=photos_html=DQKf0uNCvsvOzWvFEgGoLA; Domain=.google.com; Path=/
header: Content-Type: text/html; charset=UTF-8
header: Transfer-Encoding: chunked
header: Date: Wed, 16 Jul 2008 02:56:29 GMT
header: Cache-control: private, must-revalidate, max-age=0
header: Server: GFE/1.3
header: Connection: Close
Traceback (most recent call last): File "<pyshell#72>", line 1, in <module> picasa_service.InsertAlbum('MyTitle','MySummary') File "/usr/lib/python2.5/site-packages/gdata/photos/service.py", line 362, in InsertAlbum raise GooglePhotosException(e.args[0]) GooglePhotosException: (500, 'Internal Server Error', '')
Why is this? I've done this with Calendars and Contacts using auth sub token with no problem - what's different??? Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Picasa Web Albums API" group.
To post to this group, send email to Goog...@googlegroups.com
To unsubscribe from this group, send email to
Goog...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/Google-Picasa-Data-API?hl=en
-~----------~----~----~----~------~----~------~--~---




