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
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.
Answer by JohnSchubert · Mar 21 at 06:52 PM
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.
Answer by george23 · Dec 23, 2021 at 08:45 AM
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.
missing valid "0262_PYTHON_API_BPK" license. How to fix it? 0 Answers
Which automation language is supported extensible to automate STC using python? or Rest API? 1 Answer
Does spirent hltapi support BGP import route table under sth.emulation_bgp_route_config in python ? 0 Answers
How to get results through stcapi 0 Answers
Copyright 2008- Spirent Communications, all rights reserved. Terms and Conditions.