NisHera
5 years agoValued Contributor
error in TE
I have a script prefectly run on my local machine with TC.
But if runs on TE at server machine it gives error........
method is something like..
class revers(): .................................. ............................................ def updatePay_Last(self): Delay(12000,'delay for a while') #--------the error fired here------------ Log.Message("Just Loggg") Log.Message(str(Project.Variables.VariableExists('RunNoCollect'))) Log.Message( Project.Variables.GetVariableType('RunNoCollect')) Log.Message(str(Project.Variables.RunNoCollect.RowCount)+"........."+str(Project.Variables.RunNoCollect.ColumnCount)) Log.Message( Project.Variables.GetVariableDescription('RunNoCollect')) Log.Message(str(Project.Variables.RunNoCollect.Item[1,2])+" is the problem child...........") MyVar = Project.Variables.RunNoCollect Iterator = MyVar.Iterator # Initializes the iterator Iterator.Reset() # Iterates through the rows while not Iterator.IsEOF(): # Returns the column name by its index ColName = MyVar.ColumnName[1] # Retrieves values and posts them to the log value = Iterator.Value[ColName] Log.Message(value) # Forwards the iterator to the next row Iterator.Next() runNo = Project.Variables.RunNoCollect.Item[1,2] .............. ................... def main(): reversOBJ = revers() ................................. .................................... reversOBJ.checkYTDValues('Final') reversOBJ.updatePay02() reversOBJ.checkRun(Project.Variables.RunNoCollect.Item[1,1],'checkRun02') reversOBJ.updatePay_Last() # ---------this is where calling happens--------- reversOBJ.checkRun(Project.Variables.RunNoCollect.Item[1,2],'checkRun03') reversOBJ.checkFinal()
but if I run below no problem...
def just_test(): reversOBJ = revers() reversOBJ.updatePay_Last()
any idea is appreciated..
It might not be that it doesn't work in TE but more that the machine running TE may be having problems opening the connection. I know for a fact that the method you're calling works just fine in both (I use it myself). So, the next investigation point I'd look at is network connectivity to the SQL server from the remote TE box, possibly firewall or user permission issues or something like that.