Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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
sys.path.append("*path*")
clr.AddReference("incacom")

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()
like image 696
paolo2988 Avatar asked Dec 05 '25 10:12

paolo2988


1 Answers

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:

a.GetCurrentDataBase().BrowseItem('MyExperiment')[0].OpenExperiment()
like image 92
Dmitry Grigoryev Avatar answered Dec 07 '25 00:12

Dmitry Grigoryev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!