Hoper Hoper - 1 year ago 505
Python Question

Inca Open Experiment Python

I am working on python and i need to use a Tool named "Inca". Now i am able to run remotely this tool but i can't to open an experiment located in a specific workspace.

import sys,clr

from de.etas.cebra.toolAPI.Inca import*

targetFolder = None
myDB = None
tempItemm = None

a = Inca()

myDB = a.GetCurrentDataBase()

tempItem = myDB.GetItemInFolder("*par1"*, "*par2*")

w = myDB.GetActivehardwareConfiguration()
exp = w.GetAssignedExperimentEnviroment()
e = exp.OpenExperiment()

Answer Source

It looks like you have a configuration problem. Either you don't have an active hardware configuration, or an experiment environment wasn't assigned to it. As a result, one of your calls returns None, which you don't check for, and the next call fails because NoneType doesn't have the method you expect.

Nevertheless, if you know the name of your experiment environment, you can always find it via BrowseItem call on your Inca database:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download