Hello everyone,
The following code works fine in Google App Engine when it is part of
a normal request (not a task):
spreadKey = '...'
client = gdata.spreadsheet.service.SpreadsheetsService()
gdata.alt.appengine.run_on_appengine(client)
client.email = '
anA...@gmail.com'
client.password = '...'
client.source = '...'
client.ProgrammaticLogin()
feed = client.GetWorksheetsFeed(spreadKey) #
When I invoke it within a task, I receive this error:
Exception in request: RequestError: {'status': 404L, 'body': '<HTML>
\n<HEAD>\n<TITLE>Not Found</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF"
TEXT="#000000">\n<H1>Not Found</H1>\n<H2>Error 404</H2>\n</BODY>\n</
HTML>\n', 'reason': ''}
Traceback (most recent call last):
File "/base/python_lib/versions/third_party/django-1.0/django/core/
handlers/base.py", line 86, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/base/data/home/apps/.../..._views.py", line 412, in ...
feed = client.GetWorksheetsFeed(spreadKey) #
File "/base/data/home/.../gdata/spreadsheet/service.py", line 126,
in GetWorksheetsFeed
converter=gdata.spreadsheet.SpreadsheetsWorksheetsFeedFromString)
File "/base/data/home/.../gdata/service.py", line 1050, in Get
'reason': server_response.reason, 'body': result_body}
RequestError: {'status': 404L, 'body': '<HTML>\n<HEAD>\n<TITLE>Not
Found</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
\n<H1>Not Found</H1>\n<H2>Error 404</H2>\n</BODY>\n</HTML>\n',
'reason': ''}
I need to access consecutively:
feed = client.GetWorksheetsFeed(spreadKey) and
listFeed = client.GetListFeed(spreadKey, workKey)
for a spreadsheet of a user which give me access to only this
spreadsheet. I try to use ProgrammaticLogin so that the user can grant
access to '
anA...@gmail.com'. (And that works fine, but not in a
task...)
Previously I tried to use the AuthSub interface as explained in a
previous tread (
http://groups.google.com/group/gdata-python-client-library-contributors/browse_thread/thread/bf36857e9be98899?hl=en
), but with this method, I had problems to limit the scope of the
authorization to only one spreadsheet...?
Could someone help me to find a way to solve this situation?
Thanks in advance,
Michel