google-code-export / gdata-python-client

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

RequestError:'status': 302L #499

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
File 
"/base/python_runtime/python_lib/versions/1/google/appengine/ext/webapp/__init__
.py", line 515, in __call__
    handler.get(*groups)
  File "/base/data/home/apps/a35533/c.348647617693808865/booking.py", line 106, in get
    edit_link = InsertEvent(self, self.session['username'],self.session['name'], insert_time_from, insert_time_to)
  File "/base/data/home/apps/a35533/c.348647617693808865/booking.py", line 120, in InsertEvent
    new_event = self.cal_client.InsertEvent(event, '/calendar/feeds/default/private/full')
  File "/base/data/home/apps/a35533/c.348647617693808865/gdata/calendar/service.py", line 159, in InsertEvent
    converter=gdata.calendar.CalendarEventEntryFromString)
  File "/base/data/home/apps/a35533/c.348647617693808865/gdata/service.py", line 1236, in Post
    media_source=media_source, converter=converter)
  File "/base/data/home/apps/a35533/c.348647617693808865/gdata/service.py", line 1347, in PostOrPut
    redirects_remaining - 1, media_source, converter=converter)
  File "/base/data/home/apps/a35533/c.348647617693808865/gdata/service.py", line 1347, in PostOrPut
    redirects_remaining - 1, media_source, converter=converter)
  File "/base/data/home/apps/a35533/c.348647617693808865/gdata/service.py", line 1347, in PostOrPut
    redirects_remaining - 1, media_source, converter=converter)
  File "/base/data/home/apps/a35533/c.348647617693808865/gdata/service.py", line 1347, in PostOrPut
    redirects_remaining - 1, media_source, converter=converter)
  File "/base/data/home/apps/a35533/c.348647617693808865/gdata/service.py", line 1355, in PostOrPut
    'body': result_body}
RequestError: {'status': 302L, 'body': '<HTML>\n<HEAD>\n<TITLE>Moved 
Temporarily</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" 
TEXT="#000000">\n<H1>Moved Temporarily</H1>\nThe document has moved <A 
HREF="http://www.google.com/calendar/feeds/default/private/full?gsessionid=B5kQW
FNR3b1SH2pAnCiVOw">here</A>.\n</BODY>\n</HTML>\n', 'reason': 'Redirect 
received, but redirects_remaining <= 0'}

What is the expected output? What do you see instead?

What version of the product are you using?

Please provide any additional information below.

Original issue reported on code.google.com by a355...@gmail.com on 27 Feb 2011 at 1:39

GoogleCodeExporter commented 9 years ago
This is not an issue with the Python client library but mostly an issue with 
the API as it sends too much redirects.
I would advise you to use the latest version of gdata/data.py and 
gdata/calendar/{data,client}.py from the repository and use the 
"redirects_remaining" parameter to ask the client to handle more redirects:

[CODE]
calendar_client.InsertEvent(<your_data>, redirects_remaining=10)
[/CODE]

Original comment by ala...@google.com on 28 Feb 2011 at 7:02