google-code-export / gdata-python-client

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

Too many redirects from server: 302 #492

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. I use developer version from repository (Revision: 5312171253). 
2. I've tried to export from doc to html:

    client = gdata.docs.client.DocsClient()
    client.ClientLogin('my_name@gmail.com', '******', client.source)
    file_path = '/var/www/result.html'
    ms = gdata.data.MediaSource(file_path='/var/www/file.doc', content_type='application/msword')
    entry = client.Upload(ms, 'MyDocTitle')
    client.Export(entry, file_path)

And I've get this error:
Exception Type:     RedirectError
Exception Value:    Too many redirects from server: 302
Exception Location:     /usr/lib/python2.6/site-packages/gdata/docs/client.py in 
_download_file, line 105

I guess, this error appears beacause there is wrong 302 redirect handling in 
request method in file gdata/client.py. I've tried to change 
redirects_remaining arg in this method to 30, but there is no effect.

Original issue reported on code.google.com by 40i...@gmail.com on 3 Feb 2011 at 1:49

GoogleCodeExporter commented 9 years ago
We fixed this in the API yesterday.

Thanks,
Vic

Original comment by vicfry...@google.com on 4 Feb 2011 at 12:29

GoogleCodeExporter commented 9 years ago
I am still getting this error using google calendar:

Traceback (most recent call last):
  File "/home/ignas/.buildout/eggs/nose-1.1.2-py2.6.egg/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/ignas/src/busy/src/busy/lib/google.py", line 18, in test
    feed = client.GetAllCalendarsFeed()
  File "/home/ignas/.buildout/eggs/gdata-2.0.14-py2.6.egg/gdata/calendar/client.py", line 177, in get_all_calendars_feed
    **kwargs)
  File "/home/ignas/.buildout/eggs/gdata-2.0.14-py2.6.egg/gdata/calendar/client.py", line 124, in get_calendars_feed
    desired_class=desired_class, **kwargs)
  File "/home/ignas/.buildout/eggs/gdata-2.0.14-py2.6.egg/gdata/client.py", line 635, in get_feed
    **kwargs)
  File "/home/ignas/.buildout/eggs/gdata-2.0.14-py2.6.egg/gdata/client.py", line 299, in request
    **kwargs)
  File "/home/ignas/.buildout/eggs/gdata-2.0.14-py2.6.egg/gdata/client.py", line 299, in request
    **kwargs)
  File "/home/ignas/.buildout/eggs/gdata-2.0.14-py2.6.egg/gdata/client.py", line 299, in request
    **kwargs)
  File "/home/ignas/.buildout/eggs/gdata-2.0.14-py2.6.egg/gdata/client.py", line 299, in request
    **kwargs)
  File "/home/ignas/.buildout/eggs/gdata-2.0.14-py2.6.egg/gdata/client.py", line 305, in request
    response, RedirectError)
RedirectError: Too many redirects from server: 302, <HTML>

Original comment by ignas.mi...@gmail.com on 19 Aug 2011 at 5:00

GoogleCodeExporter commented 9 years ago
Hello,

There is an other issue tracking redirect related bugs in the issue tracker. 
Anyhow, this issue has been fixed in the repository and we advise developers to 
sync their client with the repository as many fixes are pushed there before 
making it into a release.

Best,
Alain

Original comment by ala...@google.com on 19 Aug 2011 at 5:07