Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Approvals
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Pricing
  • Help

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Accounting
  • Inventory
  • PoS
  • Project
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tags (View all)
odoo accounting v14 pos v15
About this forum
Help

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

Subscribe

Get notified when there's activity on this post

This question has been flagged
calendargoogle_calendar
8 Replies
7036 Views
Avatar
Dale Thomas

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

0
Avatar
Discard
Jérémy Kersten (jke)

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.

Dale Thomas
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.

Jérémy Kersten (jke)

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)

Dale Thomas
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.

Jérémy Kersten (jke)

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

Dale Thomas
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.

William Brugger

Hello,


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

Avatar
MFoo
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)

1
Avatar
Discard
William Brugger

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.

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Sign up
Related Posts Replies Views Activity
Google Calendar sync creates contacts from past events – how to limit?
calendar google_calendar
Avatar
Avatar
1
Jul 25
1675
Google Calendar sync creates contacts from past events – how to limit?
calendar google_calendar
Avatar
0
Jul 25
1386
How to create a Google event in an Organization shared calendar (not individual) when creating an appointment in Odoo?
calendar google_calendar
Avatar
Avatar
1
Jan 25
2468
Sync specific caoendar with Google calendar
calendar google_calendar
Avatar
Avatar
2
Nov 23
2743
Re curing Events in Calendar synced from Google
calendar google_calendar
Avatar
Avatar
Avatar
Avatar
3
Sep 25
5973
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now