Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How can I resolve Google Calendar Error: 'set' object does not support indexing?

By
Dale Thomas
on 1/29/15, 8:06 PM 1,203 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

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.

Jérémy Kersten (jke)
on 1/29/15, 8:30 PM

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.

Dale Thomas
on 1/29/15, 8:37 PM

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)

Jérémy Kersten (jke)
on 1/30/15, 3:22 AM

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.

Dale Thomas
on 1/30/15, 7:58 AM

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

Jérémy Kersten (jke)
on 1/30/15, 9:19 AM

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.

Dale Thomas
on 1/30/15, 12:43 PM

Hello,


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

Amy Kuschel Bride, William Brugger
on 3/7/16, 7:32 PM
1
MFoo
On 3/25/16, 10:31 AM

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)

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.

Amy Kuschel Bride, William Brugger
on 3/25/16, 2:55 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 1/29/15, 8:06 PM
Seen: 1203 times
Last updated: 3/25/16, 2:53 PM