ACueva / googlecl

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

gdata.service.RequestError: Moved Temporarily errors when using bash script to add multiple calendar entries... #116

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. for f in {1..89};do NUM=`echo "$f+12"|bc -q`; DATE=`date -v +$f\d 
"+%Y-%m-%d"`; google calendar add "BURPEES: $NUM $DATE";sleep 1;done
2.
3.

What is the expected output? What do you see instead?
All calendar entries should be entered, but get these errors intermittently 
instead: 

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/calendar/service.py", line 474, in _run_add
    client.quick_add_event(args, cal_user)
  File "/Library/Python/2.6/site-packages/googlecl/calendar/service.py", line 184, in quick_add_event
    USER_BATCH_URL_FORMAT % calendar_user)
  File "/Library/Python/2.6/site-packages/gdata/calendar/service.py", line 446, in ExecuteBatch
    return self.Post(batch_feed, url, converter=converter)
  File "/Library/Python/2.6/site-packages/gdata/service.py", line 1236, in Post
    media_source=media_source, converter=converter)
  File "/Library/Python/2.6/site-packages/gdata/service.py", line 1346, in PostOrPut
    redirects_remaining - 1, media_source, converter=converter)
  File "/Library/Python/2.6/site-packages/gdata/service.py", line 1346, in PostOrPut
    redirects_remaining - 1, media_source, converter=converter)
  File "/Library/Python/2.6/site-packages/gdata/service.py", line 1346, in PostOrPut
    redirects_remaining - 1, media_source, converter=converter)
  File "/Library/Python/2.6/site-packages/gdata/service.py", line 1346, in PostOrPut
    redirects_remaining - 1, media_source, converter=converter)
  File "/Library/Python/2.6/site-packages/gdata/service.py", line 1354, in PostOrPut
    'body': result_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="http://www.google.com/calendar/feeds/default/private/full/batch?gsessionid
=MjSyQ309pS33PqdsT6n5ag">here</A>.\n</BODY>\n</HTML>\n', 'reason': 'Redirect 
received, but redirects_remaining <= 0'}

What version of the product are you using? On what operating system?
google 0.9.7 on mac os X

Please provide any additional information below.

Original issue reported on code.google.com by volf...@gmail.com on 21 Jun 2010 at 5:13

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
> calendar --cal "Birthdays" add "Bill Billybill 1/14 yearly"
Traceback (most recent call last):
  File "C:\Python26\Scripts\google", line 463, in <module>
    main()
  File "C:\Python26\Scripts\google", line 454, in main
    run_interactive(parser)
  File "C:\Python26\Scripts\google", line 251, in run_interactive
    run_once(options, args)
  File "C:\Python26\Scripts\google", line 356, in run_once
    task.run(client, options, args)
  File "c:\python26\lib\site-packages\googlecl\calendar\service.py", line 474, i
n _run_add
    client.quick_add_event(args, cal_user)
  File "c:\python26\lib\site-packages\googlecl\calendar\service.py", line 184, i
n quick_add_event
    USER_BATCH_URL_FORMAT % calendar_user)
  File "c:\python26\lib\site-packages\gdata\calendar\service.py", line 446, in E
xecuteBatch
    return self.Post(batch_feed, url, converter=converter)
  File "c:\python26\lib\site-packages\gdata\service.py", line 1236, in Post
    media_source=media_source, converter=converter)
  File "c:\python26\lib\site-packages\gdata\service.py", line 1346, in PostOrPut

    redirects_remaining - 1, media_source, converter=converter)
  File "c:\python26\lib\site-packages\gdata\service.py", line 1346, in PostOrPut

    redirects_remaining - 1, media_source, converter=converter)
  File "c:\python26\lib\site-packages\gdata\service.py", line 1346, in PostOrPut

    redirects_remaining - 1, media_source, converter=converter)
  File "c:\python26\lib\site-packages\gdata\service.py", line 1346, in PostOrPut

    redirects_remaining - 1, media_source, converter=converter)
  File "c:\python26\lib\site-packages\gdata\service.py", line 1354, in PostOrPut

    'body': result_body}
gdata.service.RequestError: {'status': 302, 'body': '<HTML>\n<HEAD>\n<TITLE>Move
d Temporarily</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>Mov
ed Temporarily</H1>\nThe document has moved <A HREF="http://www.google.com/calen
dar/feeds/asdasdasdasdasdasd@group.calendar.google.com/private/full/batc
h?gsessionid=asdasdasdasdasdasdasd">here</A>.\n</BODY>\n</HTML>\n', 'reason': '
Redirect received, but redirects_remaining <= 0'}

Original comment by johnste...@gmail.com on 22 Jun 2010 at 11:48

GoogleCodeExporter commented 9 years ago
Merging into general 302 issue

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