Hi to all.
I'm developing a GAE App gdata calendar based. All works fine
(calendar insertion, etc.) but if the user (google account) never
activate calendar service I've the next error when I try to insert a
calendar:
Traceback (most recent call last):
File "/home/user/proyectos/gae/google_appengine/google/appengine/ext/
webapp/__init__.py", line 499, in __call__
File "/home/israel/proyectos/gae/project/controllers/calendar.py",
line 39, in get
new_calendar =
self.cal_client.InsertCalendar(new_calendar=calendar)
File "/home/user/proyectos/gae/project/lib/gdata/calendar/
service.py", line 197, in InsertCalendar
converter=gdata.calendar.CalendarListEntryFromString)
File "/home/israel/proyectos/gae/project/lib/gdata/service.py", line
866, in Post
media_source=media_source, converter=converter)
File "/home/israel/proyectos/gae/project/lib/gdata/service.py", line
986, in PostOrPut
'reason': server_response.reason, 'body': result_body}
RequestError: {'status': 403, 'body': 'You must be a calendar user to
use private feeds.', 'reason': ''}
My GAE code:
def get(self):
"""Conexión con gcalendar"""
self.cal_client = gdata.calendar.service.CalendarService()
gdata.alt.appengine.run_on_appengine(self.cal_client)
self.cal_client.email = "[EMAIL PROTECTED]"
self.cal_client.password = "XXXXXXXX"
self.cal_client.source = 'Google-Calendar_Python_Sample-1.0'
self.cal_client.ProgrammaticLogin()
"""Creates a new calendar using the specified data."""
title = "title"
description = "my calendar
location = "Barcelona"
color = '#2952A3'
time_zone='España/Madrid'
calendar = gdata.calendar.CalendarListEntry()
calendar.title = atom.Title(text=title)
calendar.summary = atom.Summary(text=description)
calendar.where = gdata.calendar.Where(value_string=location)
calendar.color = gdata.calendar.Color(value=color)
calendar.timezone = gdata.calendar.Timezone(value=time_zone)
calendar.hidden = gdata.calendar.Hidden(value='false')
new_calendar =
self.cal_client.InsertCalendar(new_calendar=calendar)
I need to know if the user have a calendar service on to alert the
user to the need to activate it.
I have searched any method to get the user calendar status and I have
tried to put the code inside try except block and I have searched in
this group, without results.
Thanks for advance and sorry for my poor english.
Regards,
Faemino
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---