Error with anomaly detection using kapacitor, (https://docs.influxdata.com/kapacitor/v1.5/guides/anomaly_detection)

Hi,

I’m a new user of InfluxDB. I recently installed and configured Kapacitor, influxdb, telegraf and chronograph on Mac OS, however upon running the sample anomaly detection using kapacitor, (Custom anomaly detection using Kapacitor | Kapacitor 1.5 Documentation) I’m seeing errors in the kapacitor log files.

I feel that it is because of some missing libraries, like the kapacitor.udf.agent and the udf_pb2. I would appreciate any help here to get past this error message.

The snippet of the log files are:

$ tail -f kapacitor.log
ts=2018-08-08T16:54:36.022-07:00 lvl=info msg=“UDF log” service=udf text=" File "/Users/arvindkumar/Guidanz/kapacitor_udf/ttest.py", line 1, in "
ts=2018-08-08T16:54:36.022-07:00 lvl=info msg=“UDF log” service=udf text=" from kapacitor.udf.agent import Agent, Handler"
ts=2018-08-08T16:54:36.022-07:00 lvl=info msg=“UDF log” service=udf text=" File "/tmp/kapacitor_udf/kapacitor/udf/agent/py/kapacitor/udf/agent.py", line 10, in "
ts=2018-08-08T16:54:36.022-07:00 lvl=info msg=“UDF log” service=udf text=" from Queue import Queue"
ts=2018-08-08T16:54:36.022-07:00 lvl=info msg=“UDF log” service=udf text=“ModuleNotFoundError: No module named ‘Queue’”
ts=2018-08-08T16:54:40.784-07:00 lvl=info msg=“closed HTTP service” service=http
ts=2018-08-08T16:54:40.784-07:00 lvl=info msg=“closed HTTP service” service=http
ts=2018-08-08T16:54:40.785-07:00 lvl=info msg=“closed task master” service=kapacitor task_master=main
ts=2018-08-08T16:54:40.785-07:00 lvl=error msg=“encountered error” service=run err=“open server: open service *udf.Service: failed to load process info for "tTest": write error: write |1: broken pipe”
run: open server: open service *udf.Service: failed to load process info for “tTest”: write error: write |1: broken pipe

‘##:::’##::::‘###::::’########:::::‘###:::::’######::‘####:’########::‘#######::’########::
##::‘##::::’## ##::: ##… ##:::‘## ##:::’##… ##:. ##::… ##…::‘##… ##: ##… ##:
##:’##::::‘##:. ##:: ##:::: ##::’##:. ##:: ##:::…::: ##::::: ##:::: ##:::: ##: ##:::: ##:
#####::::‘##:::. ##: ########::’##:::. ##: ##:::::::: ##::::: ##:::: ##:::: ##: ########::
##. ##::: #########: ##…::: #########: ##:::::::: ##::::: ##:::: ##:::: ##: ##… ##:::
##:. ##:: ##… ##: ##:::::::: ##… ##: ##::: ##:: ##::::: ##:::: ##:::: ##: ##::. ##::
##::. ##: ##:::: ##: ##:::::::: ##:::: ##:. ######::'####:::: ##::::. #######:: ##:::. ##:
…::::…::…:::::…::…:::::::::…:::::…:::…:::…:::::…::::::…:::…:::::…::

2018/08/08 16:54:45 Using configuration at: /usr/local/etc/kapacitor.conf
ts=2018-08-08T16:54:45.861-07:00 lvl=info msg=“kapacitor starting” service=run version=v1.5.0 branch=unknown commit=4f10efc41b4dcac070495cf95ba2c41cfcc2aa3a
ts=2018-08-08T16:54:45.861-07:00 lvl=info msg=“go version” service=run version=go1.10.2
ts=2018-08-08T16:54:45.861-07:00 lvl=info msg=“listing Kapacitor hostname” source=srv hostname=localhost
ts=2018-08-08T16:54:45.861-07:00 lvl=info msg=“listing ClusterID and ServerID” source=srv cluster_id=abc203df-c6f6-4f5f-a337-d232cc32a4c3 server_id=e5b783f7-346f-44e5-b591-5d133e6bb842
ts=2018-08-08T16:54:45.861-07:00 lvl=info msg=“opened task master” service=kapacitor task_master=main
ts=2018-08-08T16:54:46.149-07:00 lvl=info msg=“UDF log” service=udf text=“Traceback (most recent call last):”
ts=2018-08-08T16:54:46.149-07:00 lvl=info msg=“UDF log” service=udf text=" File "/Users/arvindkumar/Guidanz/kapacitor_udf/ttest.py", line 1, in "
ts=2018-08-08T16:54:46.150-07:00 lvl=info msg=“UDF log” service=udf text=" from kapacitor.udf.agent import Agent, Handler"
ts=2018-08-08T16:54:46.150-07:00 lvl=info msg=“UDF log” service=udf text=" File "/tmp/kapacitor_udf/kapacitor/udf/agent/py/kapacitor/udf/agent.py", line 10, in "
ts=2018-08-08T16:54:46.150-07:00 lvl=info msg=“UDF log” service=udf text=" from Queue import Queue"
ts=2018-08-08T16:54:46.150-07:00 lvl=info msg=“UDF log” service=udf text=“ModuleNotFoundError: No module named ‘Queue’”

Thanks,
Arvind