Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-10287

ExecuteScript processor not supporting Module Directory for python

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.15.3
    • 1.19.0
    • None
    • None

    Description

      The ExecuteScript processor currently does not support pointing to python modules.

      The Module Directory property is unable to find/process modules it is set to. See below [1] for example

      Also, if Module Directory property is set to /usr/lib/python<version number> (or wherever python packages are installed) the processor will AdminYield when flowfile passes through.

       

       

       

      [1] Set processor properties:
      Script Engine to python
      Script Body to

      import hello
      
      flowFile = session.get()
      flowFile = session.putAttribute(flowFile,"helloKey",hello.hello())
      session.transfer(flowFile, REL_SUCCESS)
      

      Module Directory  to /tmp/testModule

      where /tmp/testModule has a file in it named hello.py
      with the code

      def hello():
        return "hello"
      

      and pass a flowfile through.

       

      The processor will roll back the session saying `hello` is not defined

      Attachments

        Issue Links

          Activity

            People

              Nissim Shiman Nissim Shiman
              Nissim Shiman Nissim Shiman
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h 20m
                  4h 20m