Written by

Senior Startups and Community Programs Manager at InterSystems Corporation
Question Evgeny Shvarov · Oct 20, 2022

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

Comments

Guillaume Rongier · Oct 21, 2022

Hi,

You need to fill in some environment variables that allow you to authenticate yourself and therefore connect.

The variables are :

IRISUSERNAME
IRISPASSWORD
IRISNAMESPACE

In a docker file for example :

# environment variables for embedded python
ENV IRISUSERNAME "SuperUser"
ENV IRISPASSWORD "SYS"
ENV IRISNAMESPACE "IRISAPP"

In a shell :

export IRISUSERNAME=SuperUser
export IRISPASSWORD=SYS
export IRISNAMESPACE=IRISAPP
0
Evgeny Shvarov  Oct 21, 2022 to Guillaume Rongier

Thank you, @Guillaume Rongier !

Do we have this very valuable info in Documentation? Couldn't find it from scratch.

0
Evgeny Shvarov  Oct 21, 2022 to Guillaume Rongier

After turning ann CallIns and providing env variables it worked!

There are a few more, the whole set:

## Embedded Python environment

ENV IRISUSERNAME "_SYSTEM"

ENV IRISPASSWORD "SYS"

ENV IRISNAMESPACE "USER"

ENV PYTHON_PATH=/usr/irissys/bin/

ENV PATH "/usr/irissys/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/irisowner/bin"

@Guillaume Rongier , correct me if I'm wrong (tooked from your code).

We need a oneliner or zpm to start callins ) It becomes important!

0