nifi-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Burgess <>
Subject Re: Is it possible to reference python requests module in ExecuteScript?
Date Fri, 05 May 2017 19:06:22 GMT

I agree with Andy; one of the challenges with Jython is that all the
modules (and their dependencies, and THEIR dependencies, and so on)
must be Pure Python (i.e. not call native code). Most of the time I
see the module reference error, it is because some imported module is
a native (CPython) module, which Jython won't load correctly. Perhaps
there is an alternate module that is pure (if you must use Jython), or
you can try Andy's suggestions.


On Fri, May 5, 2017 at 3:03 PM, Andy LoPresto <> wrote:
> Mike,
> Jython is a challenging runtime, as Python modules that depend on native
> code or dependencies cannot be used. If the HTTP requests are not something
> that can be done with InvokeHTTP, I suggest evaluating Groovy or Ruby as
> your scripting language of choice, as they are more suited to the
> ExecuteScript scenario at this time.
> Andy LoPresto
> PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69
> On May 5, 2017, at 2:57 PM, Mike Harding <> wrote:
> Hi All,
> I'm now looking at using ExecuteScript and python engine to execute HTTP
> requests using the requests module.
> I've tried referencing requests the module but when I try to import requests
> I get a module reference error.
> I downloaded the module from here >
> Not sure why it isnt picking it up. Ive tried referencing the directory and
> the .py directly with no success.
> Any ideas where im going wrong?
> Cheers,
> Mike

View raw message