[SOLVED]Point udf pb2 message and values in udf not accessable

I have a udf much like moving_avg sample, but I can’t seem to access sub-parts of the point object in the point function:

Code for that section:

def point(self, point):

    value = point.fieldsDouble('value')

Error:

ts=2018-06-12T17:58:40.314Z lvl=info msg=“UDF log” service=kapacitor task_master=main task=chronograf-v1-5ec6f016-b00b-4955-839d-3b78c832a05f node=my4 text=“Traceback (most recent call last):”
ts=2018-06-12T17:58:40.314Z lvl=info msg=“UDF log” service=kapacitor task_master=main task=chronograf-v1-5ec6f016-b00b-4955-839d-3b78c832a05f node=my4 text=" File “/etc/kapacitor/agent/kapacitor/udf/agent.py”, line 122, in _read_loop"
ts=2018-06-12T17:58:40.314Z lvl=info msg=“UDF log” service=kapacitor task_master=main task=chronograf-v1-5ec6f016-b00b-4955-839d-3b78c832a05f node=my4 text=" self.handler.point(request.point)"
ts=2018-06-12T17:58:40.315Z lvl=info msg=“UDF log” service=kapacitor task_master=main task=chronograf-v1-5ec6f016-b00b-4955-839d-3b78c832a05f node=my4 text=" File “/etc/kapacitor/myUDF.py”, line 184, in point"
ts=2018-06-12T17:58:40.315Z lvl=info msg=“UDF log” service=kapacitor task_master=main task=chronograf-v1-5ec6f016-b00b-4955-839d-3b78c832a05f node=my4 text=" value = point.fieldsDouble(‘value’)"
ts=2018-06-12T17:58:40.315Z lvl=info msg=“UDF log” service=kapacitor task_master=main task=chronograf-v1-5ec6f016-b00b-4955-839d-3b78c832a05f node=my4 text=“TypeError: ‘google.protobuf.pyext._message.ScalarMapContainer’ object is not callable”
ts=2018-06-12T17:58:40.315Z lvl=info msg=“UDF log” service=kapacitor task_master=main task=chronograf-v1-5ec6f016-b00b-4955-839d-3b78c832a05f node=my4 text=“2018-06-12 17:58:40,314 ERROR:root: error processing request of type point: ‘google.protobuf.pyext._message.ScalarMapContainer’ object is not callable”

I thought all python components are installed… what am I missing?

Well, looks like I missed using [ ] instead of ( )… my bad.

SOLVED.

1 Like