Here's the exception:
Code: Select all
Microsoft.Scripting.Runtime.UnboundNameException: name 'error' is not defined
at DLRCachedCode.Program
at Microsoft.Scripting.ScriptCode.InvokeTarget
at Microsoft.Scripting.ScriptCode.Run
at IronPython.Runtime.PythonContext.CreateModule
at IronPython.Runtime.ModuleLoader.load_module
at Microsoft.Scripting.Actions.MatchCaller.Call3
at Microsoft.Scripting.Actions.CallSite<Microsoft.Func<Microsoft.Scripting.Actions.CallSite,Microsoft.Scripting.Runtime.CodeContext,System.Object,System.Object[],System.Object>>.UpdateAndExecute
at Microsoft.Scripting.Actions.UpdateDelegates.Update3
at IronPython.Runtime.PythonContext.Call
at IronPython.Runtime.Importer.FindAndLoadModuleFromImporter
at IronPython.Runtime.Importer.TryLoadMetaPathModule
at IronPython.Runtime.Importer.ImportTopAbsolute
at IronPython.Runtime.Importer.ImportModule
at IronPython.Runtime.Builtin.__import__
at Microsoft.Scripting.Actions.MatchCaller.Call7
at Microsoft.Scripting.Actions.CallSite<Microsoft.Func<Microsoft.Scripting.Actions.CallSite,Microsoft.Scripting.Runtime.CodeContext,System.Object,System.String,Microsoft.Scripting.IAttributesCollection,Microsoft.Scripting.IAttributesCollection,IronPython.Runtime.PythonTuple,System.Int32,System.Object>>.UpdateAndExecute
at Microsoft.Scripting.Actions.UpdateDelegates.Update7
at IronPython.Runtime.Importer.Import
at IronPython.Runtime.Operations.PythonOps.InitializeModule
at PythonMain.Main
Code: Select all
[language=python]class Program(object):
def Main(args):
Keyboard.AbortKey = System.Windows.Forms.Keys.Pause
error = 0
logFileName = "DemoTrade.rxlog"
Report.Setup(ReportLevel.Info, logFileName, True)
try:
#start test
#StartDerivix.Start()
#basic trade from TickerWindow
#TickerWindowTradeTicket.Start()
TradeTicketValidate.Start()
except ImageNotFoundException, e:
Report.Error(e.ToString())
Report.LogData(ReportLevel.Error, "Image not found", e.Feature)
Report.LogData(ReportLevel.Error, "Searched image", e.Image)
error = -1
except RanorexException, e:
Report.Error(e.ToString())
Report.Screenshot()
error = -1
except ThreadAbortException:
Report.Warn("AbortKey has been pressed")
Thread.ResetAbort()
except Exception, e:
Report.Error("Unexpected exception occured: " + e.ToString())
error = -1
Report.End()
sys.exit(error)
Main = staticmethod(Main)
Program.Main(None) [/language]
Any help is appreciated!
Steve
[edited to meet the posting standards a bit better]