Skip to Content
Menu
This question has been flagged
8 Replies
5537 Views

I was able to successfully set up the calendar synch with Google Calendar.  When I go to the calendar and click on the "Sync with Google" button I get the following error.  

Anyone know how to resolve? 

Traceback (most recent call last):
  File "/opt/odoo/openerp/http.py", line 530, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "/opt/odoo/openerp/http.py", line 567, in dispatch
    result = self._call_function(**self.params)
  File "/opt/odoo/openerp/http.py", line 303, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/openerp/service/model.py", line 113, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/openerp/http.py", line 300, in checked_call
    return self.endpoint(*a, **kw)
  File "/opt/odoo/openerp/http.py", line 796, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/openerp/http.py", line 396, in response_wrap
    response = f(*args, **kw)
  File "/opt/odoo/addons/google_calendar/controllers/main.py", line 43, in sync_data
    return gc_obj.synchronize_events(request.cr, request.uid, [], context=kw.get('local_context'))
  File "/opt/odoo/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/addons/google_calendar/google_calendar.py", line 563, in synchronize_events
    res = self.update_events(cr, uid, lastSync, context)
  File "/opt/odoo/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/addons/google_calendar/google_calendar.py", line 790, in update_events
    res = self.update_from_google(cr, uid, False, event.GG.event, "create", context=context_tmp)
  File "/opt/odoo/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/addons/google_calendar/google_calendar.py", line 479, in update_from_google
    res = calendar_event.create(cr, uid, result, context=context)
  File "/opt/odoo/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/addons/crm/calendar_event.py", line 36, in create
    res = super(calendar_event, self).create(cr, uid, vals, context=context)
  File "/opt/odoo/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/addons/calendar/calendar.py", line 1604, in create
    res = super(calendar_event, self).create(cr, uid, vals, context=context)
  File "/opt/odoo/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/addons/mail/mail_thread.py", line 377, in create
    thread_id = super(mail_thread, self).create(cr, uid, values, context=context)
  File "/opt/odoo/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/opt/odoo/openerp/api.py", line 336, in old_api
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/openerp/models.py", line 4025, in create
    record = self.browse(self._create(old_vals))
  File "/opt/odoo/openerp/api.py", line 239, in wrapper
    return new_api(self, *args, **kwargs)
  File "/opt/odoo/openerp/api.py", line 462, in new_api
    result = method(self._model, cr, uid, *args, **kwargs)
  File "/opt/odoo/openerp/models.py", line 4210, in _create
    result += self._columns[field].set(cr, self, id_new, field, vals[field], user, rel_context) or []
  File "/opt/odoo/openerp/osv/fields.py", line 1384, in set
    self._fnct_inv(obj, cr, user, id, name, value, self._fnct_inv_arg, context)
  File "/opt/odoo/addons/calendar/calendar.py", line 841, in _set_rulestring
    update_data = self._parse_rrule(field_value, dict(data), rdate)
  File "/opt/odoo/addons/calendar/calendar.py", line 1328, in _parse_rrule
    data['day'] = r._bymonthday[0]
TypeError: 'set' object does not support indexing

Avatar
Discard

hello, Seems like if you have a recurrent event in google (repeat every x th day from the month) with a format that odoo don't understand. Could you give me more information on this event ? You can add a key "calendar.debug_print" in ir.config_parameter to have logs more verbose during the synchro.

Author

Hi Jérémy. Thanks for replying. I am not sure what you mean by "You can add a key "calendar.debug_print" in ir.config_parameter to have logs more verbose during the synchro." My apologies. I am new to Odoo.

You can improve logs by setting an ir.config.parameter (Settings->Technical->Parameters-System parameters) named '´calendar.debug_print'´ with value=1! (Need to set your user as technical user to have this menu)

Author

Hi Jérémy. Thank you for the response and the help. I think I did what you requested. When go back to Calendar in developer mode I see the menu. I am not seeing any calender in the menu. Was that the expectation? My apologies. Very new to Odoo. When I try to sync the calendar the error messaging was the same.

This key allow you to see in the log from the server more details. But if you have no access to the console, it will be more complicated :/ Do you have many events on google recurrent (a meeting every month ?) ? Could you describe here the configuration (from the recurrence) of this event to reproduce it... It seems that the bug is in Odoo, but, to fix it, I need to reproduce the bug... Thanks

Author

Its a VPS so I do have console access. Is there a log I can pull? I don't think I have many re-occuring events. The main thing I think are birthdays which got put there when I sync'd with Facebook a while back.

Hello,


I am seeing the same error.  Have you been able to determine the cause?

Best Answer

In my case this error was caused by a wrong "dateutil" version.

i had version 2.4 installed. after switching to version 2.2 the error was gone.

(seems like a type was changed in dateutil.rrule from list to set in version 2.4, that's why access by index throws an error)

Avatar
Discard

I changed r._bymonthday[0] to list(r._bymonthday)[0] in a custom module. I am using 2.4, so I am guessing you may be correct.

Related Posts Replies Views Activity
0
Aug 24
217
2
Nov 23
980
3
Nov 22
3960
2
May 20
3700
3
Jan 24
11279