question

sbryden avatar image
sbryden asked JohnSchubert edited

Failed license check when using automation on STC

Hi, I am running into a problem when testing automation using python on STC. In my script, I load an existing test (which runs fine from my windows client), and attach the ports. The complete script is shown below:

from StcPython import StcPython
stc = StcPython()
print("SpirentTestCenter system version:\t", stc.get("system1", "version"))
stc.config( 'automationoptions', loglevel='info', logto='mylog.txt')
stc.perform("LoadFromDatabase", DatabaseConnectionString = "test.tcc")
stc.perform('AttachPorts', autoConnect='TRUE')
stc.apply()

At the call to apply(), I get the following error and the script aborts:

Traceback (most recent call last):
File "test.py", line 8, in <module>
stc.apply()
File "C:\Users\sbryden\TCA\StcPython.py", line 58, in apply
return self.stcInt.salApply()
RuntimeError: in apply: There were 2 validation error(s); aborting apply.
License check for Port //9/5 failed.
License check for Port //9/1 failed.

Is there a special license needed for automation? I see the same issue from linux and windows.

Thanks, Simon.

stc automation
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

JohnSchubert avatar image
JohnSchubert answered JohnSchubert edited

Yes, there is a license required for using PYTHON API. Look in your license file for this: BPK-1154A. If you don't have this license entitlement, it will fail. The same license allows Python for Linux or Windows.

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

george23 avatar image
george23 answered

I am having the same problem. If I remove the AttachPorts steps I am not getting the error but of course that is not a solution.

RuntimeError: in apply: There were 2 validation error(s); aborting apply. License check for Port //4/3 failed. License check for Port //4/4 failed.

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.