Hi, I'm getting a 404 when trying to create a calendar.  This may be
the same problem as:

http://groups.google.com/group/google-calendar-help-dataapi/browse_thread/thread/9ca7e45ad040f992/a24ba0354b0a5c4e

Below is my code and the exception.  Thanks in advance for any help!

from __future__ import with_statement
from atom import Title
from path import path
from commons.startup import run_main
from gdata.calendar.service import CalendarService
from gdata.calendar import CalendarListEntry

def main( argv ):
  with file( path( '~/.google.auth' ).expanduser() ) as f:
    user, pw = f.read().split('\n')[:2]

  cal = CalendarService( email = user, password = pw, source = 'zdb' )
  cal.ProgrammaticLogin()

  feed = cal.GetOwnCalendarsFeed()
  if 'zdb' not in ( c.title.text for c in feed.entry ):
    cle = CalendarListEntry()
    cle.title = Title( text = 'zdb' )
    cal.InsertCalendar( new_calendar = cle )

run_main()

Exception:

Traceback (most recent call last):
  File "./cal.py", line 569, in <module>
    run_main()
  File "/opt/armed/lib/python2.5/site-packages/commons/startup.py",
line 177, in
 run_main
    status = runner( main, sys.argv )
  File "/opt/armed/lib/python2.5/site-packages/commons/startup.py",
line 152, in
 <lambda>
    runner = ( ( lambda main, args: main( args ) )
  File "./cal.py", line 563, in main
    cal.InsertCalendar( new_calendar = cle )
  File "/var/lib/python-support/python2.5/gdata/calendar/service.py",
line 201, in InsertCalendar
    converter=gdata.calendar.CalendarListEntryFromString)
  File "/var/lib/python-support/python2.5/gdata/service.py", line 756,
in Post
    'reason': server_response.reason, 'body': result_body}
gdata.service.RequestError: {'status': 404, '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': 'Not Found'}


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Calendar Data API" group.
To post to this group, send email to 
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to