From: William Johnston
Sent: Friday, February 15, 2013 10:57 AM
To: Slide
Subject: Re: [Ironpython-users] need assistance with IronClad project
Alex:
I have made some progress.
My python scripts runs fine when run from the IronPython command-line using the
following:
ipy.exe -X:Frames mytest.py
But the attached error occurs when run from C#.
I added the correct search paths from the working command-line output. (By
printing sys.path.) But I still get the error with the C# app.
Here is the sample code to call the Python source file (from Resolver):
var lang = Python.CreateLanguageSetup(null);
lang.Options["Frames"] = ScriptingRuntimeHelpers.True;
var setup = new ScriptRuntimeSetup();
setup.LanguageSetups.Add(lang);
var runtime = new ScriptRuntime(setup);
var engine = runtime.GetEngine("py");
engine.SetSearchPaths(searchPaths);
engine.ExecuteFile(@"E:\Users\William Johnston\Documents\Visual Studio
2010\Projects\Visual Studio Projects\test2\test\test4\mytest.py");
Any suggestions?
Regards,
William Johnston
From: Slide
Sent: Wednesday, February 13, 2013 7:00 PM
To: William Johnston
Subject: Re: [Ironpython-users] need assistance with IronClad project
William,
Can't you just explain what the issue is? I for one can't download anything
while at work, but can answer questions if they are direct and informed.
Thanks,
Alex
On Wed, Feb 13, 2013 at 4:58 PM, William Johnston <[email protected]> wrote:
Slide:
The project has to be x86 Release. Which is not what I zipped. But still
doesn’t run.
Regards,
William Johnston
From: Slide
Sent: Wednesday, February 13, 2013 3:47 PM
To: William Johnston
Cc: [email protected]
Subject: Re: [Ironpython-users] need assistance with IronClad project
Can you be more descriptive as to issues you are seeing, what is going wrong,
what results you are getting vs. what you are expecting? Just throwing a
project out there and expecting people to look at it will probably not get you
a great amount of help.
slide
On Wed, Feb 13, 2013 at 1:43 PM, William Johnston <[email protected]>
wrote:
Hello,
I created a project that is exactly the same as the IronClad (from
Resolver) demo project.
Yet, I am getting different results.
Can anyone assist me on this?
The project files are at:
http://tenbase2.com/ironclad%20projects.zip
This is my only forum for support.
Thank you.
_______________________________________________
Ironpython-users mailing list
[email protected]
http://mail.python.org/mailman/listinfo/ironpython-users
--
Website: http://earl-of-code.com
--
Website: http://earl-of-code.com System.ArgumentException: Specified path is invalid.
at Microsoft.Scripting.Interpreter.ThrowInstruction.Run(InterpretedFrame
frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1
arg1)
at IronPython.Runtime.PythonFunction.FunctionCaller`1.Call1(CallSite site,
CodeContext context, Object func, T0 arg0)
at load_module$38(Closure , PythonFunction , Object , Object )
at IronPython.Compiler.PythonCallTargets.OriginalCallTarget2(PythonFunction
function, Object arg0, Object arg1)
at IronPython.Runtime.PythonFunction.FunctionCaller`2.Call2(CallSite site,
CodeContext context, Object func, T0 arg0, T1 arg1)
at CallSite.Target(Closure , CallSite , CodeContext , Object , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite
site, T0 arg0, T1 arg1, T2 arg2)
at IronPython.Runtime.PythonFunction.FunctionCaller`1.Call1(CallSite site,
CodeContext context, Object func, T0 arg0)
at IronPython.Runtime.PythonContext.Call(CodeContext context, Object func,
Object arg0)
at IronPython.Runtime.Importer.FindAndLoadModuleFromImporter(CodeContext
context, Object importer, String fullName, List path, Object& ret)
at IronPython.Runtime.Importer.TryLoadMetaPathModule(CodeContext context,
String fullName, List path, Object& ret)
at IronPython.Runtime.Importer.ImportModule(CodeContext context, Object
globals, String modName, Boolean bottom, Int32 level)
at IronPython.Modules.Builtin.__import__(CodeContext context, String name,
Object globals, Object locals, Object fromlist, Int32 level)
at IronPython.Runtime.Importer.Import(CodeContext context, String fullName,
PythonTuple from, Int32 level)
at IronPython.Runtime.Operations.PythonOps.ImportTop(CodeContext context,
String fullName, Int32 level)
at
Microsoft.Scripting.Interpreter.FuncCallInstruction`4.Run(InterpretedFrame
frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run1[T0,TRet](T0 arg0)
at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope)
at IronPython.Compiler.RuntimeScriptCode.Run(Scope scope)
at IronPython.Runtime.PythonContext.InitializeModule(String fileName,
ModuleContext moduleContext, ScriptCode scriptCode, ModuleOptions options)
at IronPython.Runtime.PythonContext.CompileModule(String fileName, String
moduleName, SourceUnit sourceCode, ModuleOptions options, ScriptCode&
scriptCode)
at IronPython.Runtime.Importer.LoadModuleFromSource(CodeContext context,
String name, String path)
at IronPython.Runtime.Importer.LoadPackageFromSource(CodeContext context,
String name, String path)
at IronPython.Runtime.Importer.LoadFromDisk(CodeContext context, String
name, String fullName, String str)
at IronPython.Runtime.Importer.ImportFromPathHook(CodeContext context,
String name, String fullName, List path, Func`5 defaultLoader)
at IronPython.Runtime.Importer.ImportFromPath(CodeContext context, String
name, String fullName, List path)
at IronPython.Runtime.Importer.ImportNestedModule(CodeContext context,
PythonModule module, String name, List path)
at IronPython.Runtime.Importer.ImportModuleFrom(CodeContext context, Object
from, String name)
at IronPython.Runtime.Importer.ImportModule(CodeContext context, Object
globals, String modName, Boolean bottom, Int32 level)
at IronPython.Modules.Builtin.__import__(CodeContext context, String name,
Object globals, Object locals, Object fromlist, Int32 level)
at IronPython.Runtime.Importer.Import(CodeContext context, String fullName,
PythonTuple from, Int32 level)
at IronPython.Runtime.Operations.PythonOps.ImportBottom(CodeContext context,
String fullName, Int32 level)
at
Microsoft.Scripting.Interpreter.FuncCallInstruction`4.Run(InterpretedFrame
frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run1[T0,TRet](T0 arg0)
at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope)
at IronPython.Compiler.RuntimeScriptCode.Run(Scope scope)
at IronPython.Runtime.PythonContext.InitializeModule(String fileName,
ModuleContext moduleContext, ScriptCode scriptCode, ModuleOptions options)
at IronPython.Runtime.PythonContext.CompileModule(String fileName, String
moduleName, SourceUnit sourceCode, ModuleOptions options, ScriptCode&
scriptCode)
at IronPython.Runtime.Importer.LoadModuleFromSource(CodeContext context,
String name, String path)
at IronPython.Runtime.Importer.LoadFromDisk(CodeContext context, String
name, String fullName, String str)
at IronPython.Runtime.Importer.ImportFromPathHook(CodeContext context,
String name, String fullName, List path, Func`5 defaultLoader)
at IronPython.Runtime.Importer.ImportFromPath(CodeContext context, String
name, String fullName, List path)
at IronPython.Runtime.Importer.ImportModule(CodeContext context, Object
globals, String modName, Boolean bottom, Int32 level)
at IronPython.Modules.Builtin.__import__(CodeContext context, String name,
Object globals, Object locals, Object fromlist, Int32 level)
at IronPython.Runtime.Importer.Import(CodeContext context, String fullName,
PythonTuple from, Int32 level)
at IronPython.Runtime.Operations.PythonOps.ImportStar(CodeContext context,
String fullName, Int32 level)
at
Microsoft.Scripting.Interpreter.ActionCallInstruction`3.Run(InterpretedFrame
frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run1[T0,TRet](T0 arg0)
at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope)
at IronPython.Compiler.RuntimeScriptCode.Run(Scope scope)
at IronPython.Runtime.PythonContext.InitializeModule(String fileName,
ModuleContext moduleContext, ScriptCode scriptCode, ModuleOptions options)
at IronPython.Runtime.PythonContext.CompileModule(String fileName, String
moduleName, SourceUnit sourceCode, ModuleOptions options, ScriptCode&
scriptCode)
at IronPython.Runtime.Importer.LoadModuleFromSource(CodeContext context,
String name, String path)
at IronPython.Runtime.Importer.LoadPackageFromSource(CodeContext context,
String name, String path)
at IronPython.Runtime.Importer.LoadFromDisk(CodeContext context, String
name, String fullName, String str)
at IronPython.Runtime.Importer.ImportFromPathHook(CodeContext context,
String name, String fullName, List path, Func`5 defaultLoader)
at IronPython.Runtime.Importer.ImportFromPath(CodeContext context, String
name, String fullName, List path)
at IronPython.Runtime.Importer.ImportModule(CodeContext context, Object
globals, String modName, Boolean bottom, Int32 level)
at IronPython.Modules.Builtin.__import__(CodeContext context, String name,
Object globals, Object locals, Object fromlist, Int32 level)
at Microsoft.Scripting.Interpreter.FuncCallInstruction`7.Invoke(Object arg0,
Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)
at Microsoft.Scripting.Interpreter.CallInstruction.Invoke(Object[] args)
at Microsoft.Scripting.Actions.Calls.MethodCandidate.Caller.Call(Object[]
args, Boolean& shouldOptimize)
at
IronPython.Runtime.Types.BuiltinFunction.BuiltinFunctionCaller`5.Call4(CallSite
site, CodeContext context, TFuncType func, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at IronPython.Runtime.Importer.Import(CodeContext context, String fullName,
PythonTuple from, Int32 level)
at IronPython.Runtime.Operations.PythonOps.ImportWithNames(CodeContext
context, String fullName, String[] names, Int32 level)
at
Microsoft.Scripting.Interpreter.FuncCallInstruction`5.Run(InterpretedFrame
frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run1[T0,TRet](T0 arg0)
at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope)
at IronPython.Compiler.RuntimeScriptCode.Run(Scope scope)
at IronPython.Runtime.PythonContext.InitializeModule(String fileName,
ModuleContext moduleContext, ScriptCode scriptCode, ModuleOptions options)
at IronPython.Runtime.PythonContext.CompileModule(String fileName, String
moduleName, SourceUnit sourceCode, ModuleOptions options, ScriptCode&
scriptCode)
at IronPython.Runtime.Importer.LoadModuleFromSource(CodeContext context,
String name, String path)
at IronPython.Runtime.Importer.LoadFromDisk(CodeContext context, String
name, String fullName, String str)
at IronPython.Runtime.Importer.ImportFromPathHook(CodeContext context,
String name, String fullName, List path, Func`5 defaultLoader)
at IronPython.Runtime.Importer.ImportFromPath(CodeContext context, String
name, String fullName, List path)
at IronPython.Runtime.Importer.ImportModule(CodeContext context, Object
globals, String modName, Boolean bottom, Int32 level)
at IronPython.Modules.Builtin.__import__(CodeContext context, String name,
Object globals, Object locals, Object fromlist, Int32 level)
at Microsoft.Scripting.Interpreter.FuncCallInstruction`7.Invoke(Object arg0,
Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)
at Microsoft.Scripting.Interpreter.CallInstruction.Invoke(Object[] args)
at Microsoft.Scripting.Actions.Calls.MethodCandidate.Caller.Call(Object[]
args, Boolean& shouldOptimize)
at
IronPython.Runtime.Types.BuiltinFunction.BuiltinFunctionCaller`5.Call4(CallSite
site, CodeContext context, TFuncType func, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at IronPython.Runtime.Importer.Import(CodeContext context, String fullName,
PythonTuple from, Int32 level)
at IronPython.Runtime.Operations.PythonOps.ImportTop(CodeContext context,
String fullName, Int32 level)
at
Microsoft.Scripting.Interpreter.FuncCallInstruction`4.Run(InterpretedFrame
frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run1[T0,TRet](T0 arg0)
at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope)
at IronPython.Compiler.RuntimeScriptCode.Run(Scope scope)
at IronPython.Runtime.PythonContext.InitializeModule(String fileName,
ModuleContext moduleContext, ScriptCode scriptCode, ModuleOptions options)
at IronPython.Runtime.PythonContext.CompileModule(String fileName, String
moduleName, SourceUnit sourceCode, ModuleOptions options, ScriptCode&
scriptCode)
at IronPython.Runtime.Importer.LoadModuleFromSource(CodeContext context,
String name, String path)
at IronPython.Runtime.Importer.LoadPackageFromSource(CodeContext context,
String name, String path)
at IronPython.Runtime.Importer.LoadFromDisk(CodeContext context, String
name, String fullName, String str)
at IronPython.Runtime.Importer.ImportFromPathHook(CodeContext context,
String name, String fullName, List path, Func`5 defaultLoader)
at IronPython.Runtime.Importer.ImportFromPath(CodeContext context, String
name, String fullName, List path)
at IronPython.Runtime.Importer.ImportTopAbsolute(CodeContext context, String
name)
at IronPython.Runtime.Importer.ImportModule(CodeContext context, Object
globals, String modName, Boolean bottom, Int32 level)
at IronPython.Modules.Builtin.__import__(CodeContext context, String name,
Object globals, Object locals, Object fromlist, Int32 level)
at Microsoft.Scripting.Interpreter.FuncCallInstruction`7.Invoke(Object arg0,
Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)
at Microsoft.Scripting.Interpreter.CallInstruction.Invoke(Object[] args)
at Microsoft.Scripting.Actions.Calls.MethodCandidate.Caller.Call(Object[]
args, Boolean& shouldOptimize)
at
IronPython.Runtime.Types.BuiltinFunction.BuiltinFunctionCaller`5.Call4(CallSite
site, CodeContext context, TFuncType func, T0 arg0, T1 arg1, T2 arg2, T3 arg3)
at IronPython.Runtime.Importer.Import(CodeContext context, String fullName,
PythonTuple from, Int32 level)
at IronPython.Runtime.Operations.PythonOps.ImportTop(CodeContext context,
String fullName, Int32 level)
at
Microsoft.Scripting.Interpreter.FuncCallInstruction`4.Run(InterpretedFrame
frame)
at Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame)
at Microsoft.Scripting.Interpreter.LightLambda.Run2[T0,T1,TRet](T0 arg0, T1
arg1)
at IronPython.Compiler.PythonScriptCode.RunWorker(CodeContext ctx)
at IronPython.Compiler.PythonScriptCode.Run(Scope scope)
at IronPython.Compiler.RuntimeScriptCode.InvokeTarget(Scope scope)
at IronPython.Compiler.RuntimeScriptCode.Run(Scope scope)
at Microsoft.Scripting.SourceUnit.Execute(Scope scope, ErrorSink errorSink)
at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope)
at Microsoft.Scripting.Hosting.ScriptEngine.ExecuteFile(String path)
at Microsoft.Scripting.Hosting.ScriptRuntime.ExecuteFile(String path)
at Microsoft.Scripting.Hosting.ScriptRuntime.UseFile(String path)
at test2.Program.Main(String[] args) in e:\Users\William
Johnston\Documents\Visual Studio 2010\Projects\Visual Studio
Projects\test2\test\test2\Program.cs:line 23
_______________________________________________
Ironpython-users mailing list
[email protected]
http://mail.python.org/mailman/listinfo/ironpython-users