Warning: Can't synchronize with repository "(default)" (No changeset 96d22ec3fa3ef6de3ea8dc0d7d398adc9aa071cf in the repository). Look in the Trac log for more information.

Ticket #680 (new defect)

Opened 12 months ago

Last modified 9 months ago

opimd-dates request about Begin and End are rejected : No DEFAULT_FIELDS defined for DateDomain

Reported by: prahal Owned by: mickey
Priority: major Milestone:
Component: framework/opimd Version: milestone5.5
Keywords: Cc:

Description (last modified by morphis) (diff)

There are no DFAULT_FIELDS nor add_default_fields for pimd_dates.py in opimd subsystem of frameworkd. Thus when opimd-dates send a request with >Begin and <End one gets;

Traceback (most recent call last):
May 30 07:53:12 om-gta02 xinit[192]: File "/usr/bin/opimd-dates", line 879, in <module>
May 30 07:53:12 om-gta02 xinit[192]: MainWindow()
May 30 07:53:12 om-gta02 xinit[192]: File "/usr/bin/opimd-dates", line 124, in __init__
May 30 07:53:12 om-gta02 xinit[192]: self.cal.show(today.year,today.month)
May 30 07:53:13 om-gta02 xinit[192]: File "/usr/bin/opimd-dates", line 210, in show
May 30 07:53:13 om-gta02 xinit[192]: results = opimd.query({'>Begin':(time.mktime(begin_month.timetuple())-604800), '<End':(time.mktime(end_month.timetuple())+604800)})
May 30 07:53:13 om-gta02 xinit[192]: File "/usr/bin/opimd-dates", line 56, in query
May 30 07:53:13 om-gta02 xinit[192]: x = self.dates.Query(q)
May 30 07:53:13 om-gta02 xinit[192]: File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 70, in __call__
May 30 07:53:13 om-gta02 xinit[192]: return self._proxy_method(*args, **keywords)
May 30 07:53:13 om-gta02 xinit[192]: File "/usr/lib/python2.7/site-packages/dbus/proxies.py", line 145, in __call__
May 30 07:53:13 om-gta02 xinit[192]: **keywords)
May 30 07:53:13 om-gta02 xinit[192]: File "/usr/lib/python2.7/site-packages/dbus/connection.py", line 651, in call_blocking
May 30 07:53:13 om-gta02 xinit[192]: message, timeout)
May 30 07:53:13 om-gta02 xinit[192]: dbus.exceptions.DBusException: org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
May 30 07:53:13 om-gta02 xinit[192]: File "/usr/lib/python2.7/site-packages/dbus/service.py", line 707, in _message_cb
May 30 07:53:13 om-gta02 xinit[192]: retval = candidate_method(self, *args, **keywords)
May 30 07:53:13 om-gta02 xinit[192]: File "/usr/lib/python2.7/site-packages/framework/subsystems/opimd/pimd_dates.py", line 260, in Query
May 30 07:53:13 om-gta02 xinit[192]: @dbus_method(_DIN_DATES, "a{sv}", "s", sender_keyword="sender")
May 30 07:53:13 om-gta02 xinit[192]: File "/usr/lib/python2.7/site-packages/framework/subsystems/opimd/pimd_dates.py", line 104, in process_query
May 30 07:53:13 om-gta02 xinit[192]: query_handler = SingleQueryHandler(query, self.db_handler, dbus_sender)
May 30 07:53:13 om-gta02 xinit[192]: File "/usr/lib/python2.7/site-packages/framework/subsystems/opimd/query_manager.py", line 266, in __init__
May 30 07:53:13 om-gta02 xinit[192]: BaseQueryHandler.__init__(self, query, db_handler, QueryMatcher(query), dbus_sender)
May 30 07:53:13 om-gta02 xinit[192]: File "/usr/lib/python2.7/site-packages/framework/subsystems/opimd/query_manager.py", line 113, in __init__
May 30 07:53:13 om-gta02 xinit[192]: self._entries = matcher.match(self.db_handler)
May 30 07:53:13 om-gta02 xinit[192]: File "/usr/lib/python2.7/site-packages/framework/subsystems/opimd/query_manager.py", line 72, in match
May 30 07:53:13 om-gta02 xinit[192]: return db_handler.query(self.query_obj)
May 30 07:53:13 om-gta02 xinit[192]: File "/usr/lib/python2.7/site-packages/framework/subsystems/opimd/db_handler.py", line 449, in query
May 30 07:53:13 om-gta02 xinit[192]: query = self.build_search_query(query_desc)
May 30 07:53:13 om-gta02 xinit[192]: File "/usr/lib/python2.7/site-packages/framework/subsystems/opimd/db_handler.py", line 334, in build_search_query
May 30 07:53:13 om-gta02 xinit[192]: query = query + comp_string
May 30 07:53:13 om-gta02 xinit[192]: TypeError: cannot concatenate 'str' and 'NoneType' objects

that is Begin and End are not registered in the freshly created pimd.db dates_fields nor defined as default thus even if their type meant to get accepted ('date' ) failure happens.

The attach patch restore opimd-dates functionanlity (startup then editing etc)

Attachments

pimd_dates.py.diff (499 bytes) - added by prahal 12 months ago.
add default fields for DateDomain?

Change History

Changed 12 months ago by prahal

add default fields for DateDomain?

comment:1 Changed 12 months ago by morphis

  • Description modified (diff)

comment:2 Changed 9 months ago by prahal

note that for the patch to take effect one has to restart frameworkd.service or reboot.

Note: See TracTickets for help on using tickets.