Calling Embedded Python in Docker Container - Access Denied
Hi folks!
I'm playing with Embedded python with IRIS trying to do some 'hello-world' exercises.
I'm running IRIS in container and have the following python code:
# Program to test coding with IRIS
print('Hello World')
# Run IRIS Class Method
import iris
print(iris.cls('dc.sample.ObjectScript')).Test()
So, when I execute it, I get the following:
$ /usr/irissys/bin/irispython /irisrun/repo/python/app.py Hello World Traceback (most recent call last): File "/irisrun/repo/python/app.py", line 7, in <module> import iris File "/usr/irissys/lib/python/iris.py", line 14, in <module> from pythonint import * ImportError: IrisStart failed: IRIS_ACCESSDENIED (-15)
What am I doing wrong?
Product version: IRIS 2022.1
Hi,
You need to fill in some environment variables that allow you to authenticate yourself and therefore connect.
The variables are :
In a docker file for example :
# environment variables for embedded python ENV IRISUSERNAME "SuperUser" ENV IRISPASSWORD "SYS" ENV IRISNAMESPACE "IRISAPP"
In a shell :
Thank you, @Guillaume Rongier !
Do we have this very valuable info in Documentation? Couldn't find it from scratch.
Here's the link to the documentation:
https://docs.intersystems.com/irisforhealthlatest/csp/docbook/DocBook.UI...
Thank you, @Bob Kuszewski ! Indeed it's there, but was not obvious for me for some reason :)
After turning ann CallIns and providing env variables it worked!
@Guillaume Rongier , correct me if I'm wrong (tooked from your code).
We need a oneliner or zpm to start callins ) It becomes important!