Cannot run kapacitor custom UDF anomaly detection example in the official documentation

kapacitor
#1

I am trying to run the anomaly detection example given in the kapacitor documentation guides on https://docs.influxdata.com/kapacitor/v1.5/guides/anomaly_detection/ . I am running my TICK stack in Ubuntu 16.04 and python 2.7.12 . I have followed all the steps of the documentation. However, when i restart kapacitor after creating the custom UDF, I am getting errors.

The first error i got was that protobuf could not be found. I then installed protobuf using the command: sudo apt-get install python-protobuf . Now I am getting the error log below:

ts=2018-09-18T07:29:40.771+02:00 lvl=info msg=“opened task master” service=kapacitor task_master=main
ts=2018-09-18T07:29:40.824+02:00 lvl=info msg=“UDF log” service=udf text=“Traceback (most recent call last):”
ts=2018-09-18T07:29:40.825+02:00 lvl=info msg=“UDF log” service=udf text=" File “/tmp/kapacitor_udf/ttest.py”, line 1, in "
ts=2018-09-18T07:29:40.825+02:00 lvl=info msg=“UDF log” service=udf text=" from kapacitor.udf.agent import Agent, Handler"
ts=2018-09-18T07:29:40.825+02:00 lvl=info msg=“UDF log” service=udf text=" File “/tmp/kapacitor_udf/kapacitor/udf/agent/py/kapacitor/udf/agent.py”, line 7, in "
ts=2018-09-18T07:29:40.825+02:00 lvl=info msg=“UDF log” service=udf text=" import udf_pb2"
ts=2018-09-18T07:29:40.825+02:00 lvl=info msg=“UDF log” service=udf text=" File “/tmp/kapacitor_udf/kapacitor/udf/agent/py/kapacitor/udf/udf_pb2.py”, line 23, in "
ts=2018-09-18T07:29:40.825+02:00 lvl=info msg=“UDF log” service=udf text=" \x32\x0c.agent.PointH\x00\x12\x1e\n\x03\x65nd\x18\x12 \x01(\x0b\x32\x0f.agent.EndBatchH\x00\x42\t\n\x07message\"\xf0\x02\n\x08Response\x12#\n\x04info\x18\x01 \x01(\x0b\x32\x13.agent.InfoResponseH\x00\x12#\n\x04init\x18\x02 \x01(\x0b\x32\x13.agent.InitResponseH\x00\x12-\n\tkeepalive\x18\x03 \x01(\x0b\x32\x18.agent.KeepaliveResponseH\x00\x12+\n\x08snapshot\x18\x04 \x01(\x0b\x32\x17.agent.SnapshotResponseH\x00\x12)\n\x07restore\x18\x05 \x01(\x0b\x32\x16.agent.RestoreResponseH\x00\x12%\n\x05\x65rror\x18\x06 \x01(\x0b\x32\x14.agent.ErrorResponseH\x00\x12\"\n\x05\x62\x65gin\x18\x10 \x01(\x0b\x32\x11.agent.BeginBatchH\x00\x12\x1d\n\x05point\x18\x11 \x01(\x0b\x32\x0c.agent.PointH\x00\x12\x1e\n\x03\x65nd\x18\x12 \x01(\x0b\x32\x0f.agent.EndBatchH\x00\x42\t\n\x07message*!\n\x08\x45\x64geType\x12\n\n\x06STREAM\x10\x00\x12\t\n\x05\x42\x41TCH\x10\x01*D\n\tValueType\x12\x08\n\x04\x42OOL\x10\x00\x12\x07\n\x03INT\x10\x01\x12\n\n\x06\x44OUBLE\x10\x02\x12\n\n\x06STRING\x10\x03\x12\x0c\n\x08\x44URATION\x10\x04\x62\x06proto3’)"
ts=2018-09-18T07:29:40.825+02:00 lvl=info msg=“UDF log” service=udf text=“TypeError: init() got an unexpected keyword argument ‘syntax’”

Is this error related to the environment on which i am running on? Can someone please assist me to get the example running. Thanks