Uhm, gateway events run in the gateway service, not in your workstation.
How did you figure it out? ( I'm genuinely curious about it )
The official link says that the packages are 100% pure python and that is also usable with Jython
https://pyserial.readthedocs.io/en/latest/pyserial.html
Cheers,
Cristian
That it uses DLLs isn’t quite accurate. It uses platform-specific modules like win32 and ctypes, which aren’t fully implemented in Jython.
It does mention that it “works on Jython” with the caveat that you have a JavaComm implementation on the ClassPath, which is basically saying “BYO serial implementation that conforms to this API”, but you don’t have that and the JavaComm API is old, crusty, and deprecated.
This probably deserves a separate topic if further discussion is necessary.
Hey @paul-griffith, are there similar instructions to follow with the Gateway running in Linux?
The instructions would be essentially the same, just with commands like ln instead of mklink.
If you’re in to transport protocols, here’s a two-liner for POSIX that you can use to get the libraries listed below:
git clone https://github.com/barbinbrad/ignition-jython-modules
rsync -r --exclude '.git' ignition-jython-modules/. /usr/local/ignition/user-lib/pylib
- requests (HTTP Client)
- paho.mqtt (MQTT Client)
- sparkplug_b (CirrusLink/Eclipse Tahu)
Note: There’s no security problems here, but you don’t know me, so it’s good to assume that there are. The better approach is to build your own jython modules instead of using trusting anyone. This is just an example of how you might do something similar.
I’m lost in the details…
Using Ignition 8.3.1 (b2025102109) I need to
import requests
from requests_ntlm import HttpNtlmAuth
I’ve installed python and jython; both were successful doing pip install requests-2.7.9.tar.gz
Ignition still says ImportError: No module named requests
Using Visual Studio Code python (first time ever), I’m able to get the responses I need with help of the HttpNtlmAuth library to be recognized as an authorized user.
How can I make these libraries available to Ignition so I can run my project script from Gateway Tag Events and Perspective component onActionPerformed events?
You 100% do not need to install requests. Use system.net.httpClient | Ignition User Manual
to handle all your HTTP requests. Use ignitions library to handle and manage HTTP requests full stop.
Ignition uses its own jython, not your system jython. Using pip with your system jython doesn't put the libraries in the right places.
But even if it did, it is still unwise. Mainly because of long-standing jython bugs that aren't relevant when using Ignition-provided services (or java-provided services).
Also keep in mind that CPython libraries that have any C component (like numpy and friends) are utterly and unfixably incompatible with Jython.
as far as I can see, and consistent with response from a help ticket with IA, system.net.httpClient doesn’t handle NTLM.
The author of the API I’m calling tells me that NTLM is the only way to authenticate; that’s why I’m trying to from requests_ntlm import HttpNtlmAuth.
I will be very happy to use only resources provided by Ignition.
Ah ok fair enough. Probably warrants it’s own post. Search for ‘NLTM’ in the forum though and you will find hits. Perhaps this suits you Download document from SharePoint (NTLM Authentication) - #7 by ryanjmclaughlin
Thanks ![]()
I’ve been following that and a handful of other posts (like the title of this one) but so far, just can’t get from A to B.
Found this post: Calling Web API using windows(NTLM) authentication - General Discussion - Inductive Automation Forum
As Brian's linked topic shows, that is a working approach.
The Apache libraries needed are shipped with Ignition. You don't have to add anything to your system.
The libraries are available in all scopes.
Please start a new topic, share all your code, and the details of the results you are getting. (Use preformatted text for code and logs.)