User bio
404 bio not found
Member since Apr 5, 2019
Posts:
Replies:
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=read...
For the more, make sure you are on the right namespace by specifying the var env : $IRISNAMESPACE
I would try something like this :
ClassMethod "test_dict"()
{
set pythonObj = ##class(%SYS.Python).Bytes("toto")
set dict = ##class(%SYS.Python).Builtins().dict()
do dict."__setitem__"("my_bytes", pythonObj)
w !, dict."__getitem__"("my_bytes")
}
Open Exchange applications:
Certifications & Credly badges:
![InterSystems Developer Community Legend](https://images.credly.com/images/550aa728-eaa7-46c6-a222-706228b031c3/image.png)
![InterSystems Developer Community Moderator](https://images.credly.com/images/288a3661-72e9-4275-a943-063ae9e7910f/image.png)
Global Masters badges:
![Developer Community Moderator](https://community.intersystems.com/sites/default/files/badges/developer_community_moderator.png)
![DC Expert 2021](https://community.intersystems.com/sites/default/files/badges/dc_expert_-_dc.png)
![InterSystems Developer of the Year 2021](https://community.intersystems.com/sites/default/files/badges/developer_2021.png)
![Gold InterSystems Application of the Year 2022](https://community.intersystems.com/sites/default/files/badges/app_gold.png)
![DC Best-Selling Author 2022](https://community.intersystems.com/sites/default/files/badges/author_22.png)
![Gold InterSystems Developer of the Year 2022](https://community.intersystems.com/sites/default/files/badges/developer_gold.png)
![DC Expert 2022](https://community.intersystems.com/sites/default/files/badges/expert_22.png)
Followers:
Following:
Guillaume has not followed anybody yet.
Great article, can be useful ! Thanks.