1. I gave the statement like this and the corresponding error as below –

    imptask = dbnative.classMethodValue('%SYS.Task','ImportTasks',"F:\Zbackup\LISBackupTask.xml","ck")

 

RuntimeError: server error 1217 <THROW> [ERROR_GENERAL_SERVER]

 

  1. I gave the statement like this and the corresponding error as below –

imptask = dbnative.classMethodValue('%SYS.Task','ImportTasks',"F\:\\Zbackup\\LISBackupTask\.xml","ck")

 

RuntimeError: * [ERROR_SHARED_CON_ERROR]

 

I am using IRIS Version as below -

IRIS for Windows (x86-64) 2023.1.2 (Build 450_0_23065U) Thu Dec 28 2023 14:31:25 EST [Health:5.1.0-1.m1] 

and Native driver - i have downloaded the whl file "irisnative-1.0.0-cp34.cp35.cp36.cp37.cp38.cp39-none-win_amd64.whl" from GitHub

Hi Enrico,

print("Importing LIS Backup Task")

imptask = dbnative.classMethodValue('%SYS.Task','ImportTasks(FileName = "F:\ZBackup\LISBackupTask.xml",qspec = "d")')

print("After Import LIS Backup Task: ",imptask)

The Python iterpreter is not executing the print statement after ImportTasks statement. MEans, the execution is not moving further and program is just coming out. Could be some method usage might be wrong. Plese let me know if i am doing any mistake or any other way i should provide the task details. 

Hi,

I tried updating the python script like below -

import irisnative

hostname = "127.0.0.1"
port = 1972
namespace = "%SYS" #change the namespace based on situation
username = "_SYSTEM"
password = "xxxxxxxx"
connection = irisnative.createConnection(hostname, port, namespace, username, password)
dbnative = irisnative.createIris(connection)

cfg=dbnative.classMethodValue('Config.config', 'Open')
print(cfg.get('gmheap'))

connection.close()

and i am getting the below error when i attempting to run python -

    print(cfg.get('gmheap'))
AttributeError: 'str' object has no attribute 'get'

i tried methog gmheapGet() for the property gmheap but i am not getting any output. This Config.config is persistent class and SQL table. is that is the reason 'classmethovalue' not working? the same code worked for getting %system.config.sharedmemoryheap.recommendedsize.