Influx Kapacitor : exec format error

run: open server: open service *udf.Service: failed to load process info for "movingAverage": fork/exec /tmp/kapacitor_udf/moving_avg.py: exec format error

I am running the python UDF for kapacitor and get this error. I am following the steps as given here : UDFNode | Kapacitor 1.5 Documentation