go to post Guillaume Rongier · Nov 4 did you try to put thoses var env : export IRISUSERNAME=... export IRISPASSWORD=... export IRISNAMESPACE=...
go to post Guillaume Rongier · Oct 15 You can use your default python/pip but it needs more works (setup BYOP (bring your on python), make sure that your current user has suffisant privilege to run irisdb, make use of virtual environnement, fix some C library path)
go to post Guillaume Rongier · Oct 14 Your version of numpy is not compatible with python3.9. Try to reinstall it with irispython : irispython -m pip install --target C:\InterSystems\IRIS\mgr\python numpy
go to post Guillaume Rongier · Sep 13 Great articles. Thanks for sharing. Why are you using Language Tag and not "pure" python script ? It's so much convient to work with native python script than python code in cls classes.
go to post Guillaume Rongier · Sep 3 Hi, If i remember correctly, the default behavior of the to_sql method is to use a transaction to insert the data. What i do is using with statement to ensure that the transaction is commited and closed after the insert: with engine.connect() as conn: train_df.to_sql(name='table1', con=conn, if_exists='replace', index=False) Otherwise, you can commit the transaction manually: conn = engine.connect() train_df.to_sql(name='table1', con=conn, if_exists='replace', index=False) conn.commit() conn.close() That's what i do, hope it helps.
go to post Guillaume Rongier · Sep 2 Hi, i guess you are looking for Flexible Python Runtime Feature https://docs.intersystems.com/iris20242/csp/docbook/DocBook.UI.Page.cls?... Unfortunately, this feature is only available starting IRIS 2024.1+
go to post Guillaume Rongier · Aug 29 Here, those scripts are embedded python script, which are different from python script. For whatever reason, embedded python iris module is called iris and official driver is also called iris from this wheel intersystems_irispython-3.2.0-py3-none-any.whl. This create confusion and package collision, an community edition exist that solve this issue and allow you to use them both, you can install it from here : https://github.com/intersystems-community/intersystems-irispython Another option is to use the iris wrapper : https://pypi.org/project/iris-embedded-python-wrapper/ Works well on macos, and i'm looking for feedback on windows machines.
go to post Guillaume Rongier · Aug 29 Hi, My bet is that you are using web server port 52773 instead of 1972 Try this : import iris # Open a connection to the server args = {'hostname':'127.0.0.1', 'port':1972, 'namespace':'USER', 'username':'_SYSTEM', 'password':'SYS' } try: conn = iris.connect(**args) # Create an iris object irispy = iris.createIRIS(conn) except Exception as e: # Handling the exception and printing the error print(f"An error occurred: {e}")
go to post Guillaume Rongier · Aug 27 You didn't specify the FROM --platform=linux/amd64 $IMAGE on the final part
go to post Guillaume Rongier · Jul 29 Thanks for this feedback, this is very helpful for our implementation of WSGI/ASGI. As you can see it's still a work in progress, but we are working hard to make it better. We will have a look at the cookie issue, we encountered it as well, but we haven't gone deep into it yet as you did. Your feedback will help us, thanks again. For the ASGI Post issue, it's also a known issue, that will be fixed in the next release. We also plan to add more features to the WSGI/ASGI implementation, like the ability to reload the server with a button click/a command line. We will have a look also at the WebSockets support.
go to post Guillaume Rongier · Jul 11 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
go to post Guillaume Rongier · May 15 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") }
go to post Guillaume Rongier · May 15 Great app, I see that you made an extensive use of IoP (https://github.com/grongierisc/interoperability-embedded-python), how was th user experience ? do you plan to use it again ?
go to post Guillaume Rongier · May 13 Great application, do you know that iris now support wsgi app : https://docs.intersystems.com/iris20241/csp/docbook/Doc.View.cls?KEY=AWSGI For the more, you did a pretty good job with a python only app, can you have a look at this one and tell me if you wish to learn more about Iop (Interoperability on python, the backend framework of this app): https://community.intersystems.com/post/vector-search-and-rag-retrieval-...
go to post Guillaume Rongier · Apr 11 For this given python function : file name demo.py def return_tuple(): return 1, 2, 3 To retrieve the values in ObjectScript, you can use the following code, basically use dunder methods to access the values. set return = ##class(%SYS.Python).Import("demo")."return_tuple"() write return."__len__"() // 3 write return."__getitem__"(0) // 1 write return."__getitem__"(1) // 2 write return."__getitem__"(2) // 3
go to post Guillaume Rongier · Mar 27 Hi Rob, This is indeed very impressive result. I do have a dumb question, why are you using your superserver port called mgsi instead of the default one provided by IRIS?
go to post Guillaume Rongier · Mar 26 it passes the parameter iAge to the sql statement. the sql statement have one parameter ?, so it will take place here.