Component registration
When registering the components: I used this command:
"Utils.migrate("/external/src/CoreModel/Python/settings.py)" ;
The error appears: "An error has occurred: iris.cls: error finding class",
I changed with these two lines:
result = subprocess.run(["iop", "-m", "/external/src/CoreModel/Python/settings.py"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True)
subprocess.run(["iop", "-m", "/external/src/CoreModel/Python/settings.py"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, check=True)
also there is an error:
"An error occurred: Command '['iop', '-m', '/external/src/CoreModel/Python/settings.py']' returned non-zero exit status 1."
Could you please help me?
Comments
Hi @ala zaalouni,
When you encounter this error :
The error appears: "An error has occurred: iris.cls: error finding class"
This usually mean that the Iop framework is not loaded into iris.
pip install iris-pex-embedded-python
you must init it to iris (install the associated classes to iris), for that you must do :
iop --init
or
from iop import Utils
Utils.setup()
please refer to the documentation :
https://github.com/grongierisc/interoperability-embedded-python?tab=readme-ov-file#32-with-pypi
For the more, make sure you are on the right namespace by specifying the var env : $IRISNAMESPACE
Thanks @Guillaume Rongier