[Ironpython-users] (no subject)

surangika ranathunga lady_radsu at yahoo.com
Wed Mar 14 02:18:16 CET 2012

Hi All, 

I am using Ironpython (2.7)  to call a python script from my C# console application. The code executes fine. But when I try to terminate the console by clicking 'X' , I get the below error message:
Intel(r) Visual Fortran run-time error 
forrtl: error (200): program aborting due to window-CLOSE event

Image              PC        Routine            Line        Source             
linalg.DLL         0B17D91A  Unknown               Unknown  Unknown
linalg.DLL         0B17B0F8  Unknown               Unknown  Unknown
linalg.DLL         0B166B04  Unknown               Unknown  Unknown
linalg.DLL         0B16C608  Unknown               Unknown  Unknown
KERNEL32.dll       7C87655C  Unknown               Unknown  Unknown
KERNEL32.dll       7C80B729  Unknown               Unknown  Unknown


This is how I call the python code in my C# file:
            private ObjectOperations ops;
           private object method;

            var lang = Python.CreateLanguageSetup(null);
            lang.Options["Frames"] = ScriptingRuntimeHelpers.True; 
            var setup = new ScriptRuntimeSetup(); 
            var runtime = new ScriptRuntime(setup);
            var engine = runtime.GetEngine("py");

            ScriptScope scope = runtime.CreateScope();
            ops = engine.Operations;

            ScriptSource source = engine.CreateScriptSourceFromFile("nlp.py");
            object[] parameters = new object[1];
            object klass = scope.GetVariable("nlp");
            object instance = ops.Invoke(klass);
            method = ops.GetMember(instance, "create_classifier");
           object output = ops.Invoke(method);

What am I doing wrong here? Can somebody help me out?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20120313/0ab8e231/attachment.html>

More information about the Ironpython-users mailing list