I originally tried to use this in my normal calendar, but the plug-in kept failing so I've created calendar a separate calendar (Holidays) and use them to control items when I'm not heading off to work. I use the note field in the event to have the plug-in toggle a variable. The trigger which if it detects the word Holiday in the note field it toggles a variable (true/false).
When the event in the Holiday calendar has the word in the note field everything works fine. (se here)
2016-11-20 00:00:01.962 Cynical Calendars dispatching start event Test Event #4
2016-11-20 00:00:02.016 Cynical Calendars Vacation - Holiday checking match for Test Event #4
2016-11-20 00:00:02.665 Trigger Vacation - Holiday
However it is also looking at events in other calendars which cause the plug-in to fail. This event was in my Family calendar and it had a blank note field.
2016-11-20 19:00:00.438 Cynical Calendars dispatching start event Group meditation
2016-11-20 19:00:00.457 Cynical Calendars Vacation - Holiday checking match for Group meditation
2016-11-20 19:00:00.822 Cynical Calendars Error in runConcurrentThread: Traceback (most recent call last):
File ".../Server Plugin/cyin/debugging.py", line 46, in diagnostic_log
yield
File ".../Server Plugin/cyin/debugging.py", line 56, in diagnose_call
return method(*args, **kwargs)
File ".../Server Plugin/cyin/asynplugin.py", line 52, in runConcurrentThread
self.run()
File ".../Server Plugin/asyn/inject.py", line 49, in run
asyn.Controller.run(self)
File ".../Server Plugin/asyn/controller.py", line 95, in run
self._dispatch()
File ".../Server Plugin/asyn/controller.py", line 226, in _dispatch
top.callout(Ctx('TIMER', sched=top, control=self, when=top.when, now=now))
File ".../Server Plugin/asyn/core.py", line 140, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File ".../Server Plugin/ical/proc.py", line 206, in _timer_event
self._drain()
File ".../Server Plugin/ical/proc.py", line 223, in _drain
self.callout('event', moment)
File ".../Server Plugin/asyn/core.py", line 140, in callout
results = [cb(ctx, *args) for cb in list(self._callbacks)] # latch callback list
File "plugin.py", line 160, in _calev
CalEvent.trigger(data)
File ".../Server Plugin/cyin/iom.py", line 630, in trigger
for event in cls.all_matching(*args, **kwargs):
File ".../Server Plugin/cyin/iom.py", line 624, in all_matching
if event.matches(*args, **kwargs):
File "plugin.py", line 64, in matches
if not self.match(moment):
File "plugin.py", line 44, in match
if self.notes and not self.notes.search(ev.notes):
TypeError: expected string or buffer
2016-11-20 19:00:00.858 Cynical Calendars Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
2016-11-20 19:00:13.474 Cynical Calendars plugin starting asyn operation