blackcyber99 / googlecl

Automatically exported from code.google.com/p/googlecl
0 stars 0 forks source link

302 Redirect RequestError -- Moved Temporarily #167

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Many people experience the sporadic appearance of a stack trace ending in

gdata.service.RequestError: {'status': 302, 'body': '<HTML>\n<HEAD> 
\n<TITLE>Moved Temporarily</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" 
TEXT="#000000">\n<H1>Moved Temporarily</H1> ... redirect url snipped ...
'reason': 'Moved Temporarily'}

This seems to be a problem with gdata, as tracked in issues 268, 353, 360, 367 
in the gdata-python-client project.

We may eventually implement a quick-fix solution (but configurable) as seen in 
268, but I'd like to collect as much usage data as possible.

If you're seeing this error, please post the following information as a comment:

Version of Gdata (aka gdata-python-client, aka python-gdata)
Version of GoogleCL
Operating System
Type of Google account (regular, Apps, or Premiere. If you don't know, it's 
probably regular).
Command that triggers the error (e.g. $ google calendar add --cal wishlist 
"Figured out 302 error")

Original issue reported on code.google.com by tom.h.mi...@gmail.com on 24 Jun 2010 at 12:20

GoogleCodeExporter commented 8 years ago
Issue 116 has been merged into this issue.

Original comment by tom.h.mi...@gmail.com on 24 Jun 2010 at 12:21

GoogleCodeExporter commented 8 years ago
Issue 120 has been merged into this issue.

Original comment by tom.h.mi...@gmail.com on 24 Jun 2010 at 12:22

GoogleCodeExporter commented 8 years ago
Issue 121 has been merged into this issue.

Original comment by tom.h.mi...@gmail.com on 24 Jun 2010 at 12:22

GoogleCodeExporter commented 8 years ago
Issue 135 has been merged into this issue.

Original comment by tom.h.mi...@gmail.com on 24 Jun 2010 at 12:23

GoogleCodeExporter commented 8 years ago
Gdata: python-gdata  2.0.8-1.1 (deb package)
GoogleCL: /usr/local/bin/google --version google 0.9.7 (via svn today)
OS: Ubuntu 9.10
Google Apps Acct: Premier
Command: google docs edit

Note: The 302 redirect error is 100% reproducible. 

Original comment by burgiss@gmail.com on 26 Jun 2010 at 1:40

GoogleCodeExporter commented 8 years ago
Thanks for looking into this:
Version of Gdata: gdata-2.0.10
Version of GoogleCL: google 0.9.7
Operating System -uname -a :  Darwin MatBook.local 10.4.0 Darwin Kernel Version 
10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386

Type of Google account: Apps

MatBook:~ mclare$ google docs edit --title "Stuff" --editor "nano"
No matching documents found! Creating it.
Traceback (most recent call last):
  File "/usr/local/bin/google", line 463, in <module>
    main()
  File "/usr/local/bin/google", line 457, in main
    run_once(options, args)
  File "/usr/local/bin/google", line 356, in run_once
    task.run(client, options, args)
  File "/Library/Python/2.6/site-packages/googlecl/docs/service.py", line 439, in _run_edit
    client.edit_doc(doc_entry, editor, format_ext)
  File "/Library/Python/2.6/site-packages/googlecl/docs/service.py", line 104, in edit_doc
    self.Export(doc_entry.content.src, path)
  File "/Library/Python/2.6/site-packages/gdata/docs/service.py", line 361, in Export
    self.Download(entry_or_id_or_url, file_path, ext, gid, extra_params)
  File "/Library/Python/2.6/site-packages/gdata/docs/service.py", line 340, in Download
    self._DownloadFile(url, file_path)
  File "/Library/Python/2.6/site-packages/gdata/docs/service.py", line 178, in _DownloadFile
    'body': response_body}
gdata.service.RequestError: {'status': 302, '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="https://docs.google.com/feeds/download/documents/export/Export?exportForma
t=txt&id=1CsUnDVAMpSAYdbY175ZEwxDMAJY_Xs8-mRlfRX8lkKI">here</A>.\n</BODY>\n</HTM
L>\n', 'reason': 'Moved Temporarily'}

Original comment by matt.cl...@gmail.com on 29 Jun 2010 at 1:17

GoogleCodeExporter commented 8 years ago
Issue 187 has been merged into this issue.

Original comment by tom.h.mi...@gmail.com on 29 Jun 2010 at 1:31

GoogleCodeExporter commented 8 years ago
Gdata: python-gdata  2.0.8-1.1 (deb package)
GoogleCL: /usr/local/bin/google --version google 0.9.7 (via svn r308)
OS: Ubuntu 9.04
Google Apps Acct: Apps
Command: google docs edit --user me@mydomain.com --title "Title" --editor vim

Original comment by hiranya...@gmail.com on 29 Jun 2010 at 2:42

GoogleCodeExporter commented 8 years ago
Hi Devs,

Is this issue fixed in the trunk now?

Original comment by hiranya...@gmail.com on 6 Jul 2010 at 5:13

GoogleCodeExporter commented 8 years ago
gdata: 2.0.10
googlecl: 0.9.8 (via setup.py)
OS: Centos 5.5
Python: 2.6.1
Account: Apps Premiere
Command: google docs edit --title "Title"

Original comment by grishalevit@gmail.com on 9 Jul 2010 at 6:54

GoogleCodeExporter commented 8 years ago
gdata: 2.0.10
googlecl: 0.9.8
OS: Ubuntu 10.04
Python: 2.6.5
Account: Regular
Command: google docs edit --title "myfile" --editor vim

Original comment by CChuahu...@gmail.com on 15 Jul 2010 at 10:00

GoogleCodeExporter commented 8 years ago
gdata: 2.0.10
googlecl: 0.9.8
OS: OpenSuse 11.2
Python: 2.6.5
Account: Regular
Command: google docs edit --title="Code" --editor="vim"

After some investigation I find out that problem is in gdata rss feed. Feed 
returns as if document is on http://*, but document is on https://*.

I am adding nasty workaround, that demonstrates main problem. Patch fix 
problem, but it just for reference -- it not suppose to get on source code.

I am also adding bad feed's XML, where feed->entry->content->src is without 
https.

I am not sure if this is googlecl or gdata or gdata's feed problem.

Original comment by petra...@gmail.com on 17 Jul 2010 at 7:30

Attachments:

GoogleCodeExporter commented 8 years ago
Both on my guruplug (debian sid/armel) as on my ubuntu system (10.10 i686).
On both the the same documents have this problem. Via the website these 
documents can be accessed without trouble

Version of Gdata : python-gdata                    2.0.8-1.1 
Version of GoogleCL: googlecl                        0.9.11-1
Operating System: Linux guruplug 2.6.33.5, armv5tel GNU/Linux, debian sid
Type of Google account : Apps
Command that triggers the error : google docs get "doctitle"

Version of Gdata :  python-gdata 2.0.8-1.1
Version of GoogleCL: googlecl    0.9.11-1
Operating System: 2.6.35-22-generic #34-Ubuntu SMP Sun Oct 10 09:24:00 UTC 2010 
i686 GNU/Linux
Type of Google account : Apps
Command that triggers the error : google docs get "doctitle"

Original comment by qui...@gmail.com on 17 Oct 2010 at 10:20

GoogleCodeExporter commented 8 years ago
Attached is a patch against 0.9.11 that will force GoogleCL to retry the 
operation when it encounters a 302 error. You can change the number of attempts 
with the "max_retries" configuration file option (0 for infinite attempts), and 
set a delay between retries with the "retry_delay" configuration file option (0 
for no delay, 0.5 for a half second delay, etc.).

I don't think this patch will fix everything, definitely not if you have a 100% 
reproducible error, but I've noticed an improvement in Calendar.  Hopefully it 
will help with the docs errors as well. Let me know if the patch helps (or 
hurts)!

I highly recommend also upgrading to the latest gdata. There's a how-to in the 
wiki's FAQ page.

(This patch is also applied in the trunk).

Original comment by tom.h.mi...@gmail.com on 29 Oct 2010 at 5:50

Attachments:

GoogleCodeExporter commented 8 years ago
Issue 371 has been merged into this issue.

Original comment by tom.h.mi...@gmail.com on 3 Mar 2011 at 2:34

GoogleCodeExporter commented 8 years ago
Version of Gdata (aka gdata-python-client, aka python-gdata)
Version of GoogleCL
Operating System
Type of Google account (regular, Apps, or Premiere. If you don't know, it's 
probably regular).
Command that triggers the error (e.g. $ google calendar add --cal wishlist 
"Figured out 302 error")

Original comment by david.sh...@gmail.com on 18 Mar 2011 at 12:04

GoogleCodeExporter commented 8 years ago
python-gdata 2.0.14 (I think, simply installed from Ubuntu repos for pangolin)
google 0.9.13
Linux (Ubuntu 12.04)
regular account

google calendar --cal MM2 add "Mitch Humpherys 13 Mar yearly" # doesn't do it 
every time

Original comment by mitch.sp...@gmail.com on 30 Apr 2012 at 5:54

GoogleCodeExporter commented 8 years ago
Any chance this is going to be fixed, almost 3 years later?

For what it's worth:
Version of Gdata: Whatever comes with the Windows package.
Version of GoogleCL: 0.9.14
Operating System: Windows
Type of Google account: Regular & Apps.
Command that triggers the error: google.exe calendar --cal Testing --reminder 
1d add "Testing Friday".

Original comment by brooks...@gmail.com on 27 Apr 2013 at 7:57

GoogleCodeExporter commented 8 years ago
Has anyone tried Tom's patch and found it to work?

Original comment by jh...@google.com on 1 May 2013 at 2:10

GoogleCodeExporter commented 8 years ago
Tom's patch is a mere workaround.  There shouldn't be 302er hickups in the 
first place.

Original comment by torsten....@gmail.com on 20 Aug 2013 at 8:52

GoogleCodeExporter commented 8 years ago
Version of Gdata : gdata-2.0.18-py2.7.egg
Version of GoogleCL:
Operating System : Windows XP
Type of Google Account : regular
Command that triggers the error: google.exe calendar --cal Testing --InsertEvent

Original comment by pboulang...@gmail.com on 29 Aug 2013 at 6:02

GoogleCodeExporter commented 8 years ago
This really kill me a lot. Is it fixed? 

Original comment by vivekjus...@gmail.com on 21 Oct 2013 at 6:05

GoogleCodeExporter commented 8 years ago
We’re sorry, but your Gmail account is temporarily unavailable. We apologize 
for the inconvenience and suggest trying again in a few minutes. You can view 
the Apps Status Dashboard for the current status of the service.

If the issue persists, please visit the Gmail Help Center »

Try Again Sign Out

Hide Detailed Technical Info
Numeric Code: 167

Original comment by aclar...@gmail.com on 8 Feb 2014 at 1:29

GoogleCodeExporter commented 8 years ago
is this issue fixed? We have lot of impact on our product with this annoying 
issue

Original comment by gopal.pa...@gmail.com on 1 Apr 2015 at 2:08