Hi, The module in question is a module created with "Python.CreateModule(engine, "mymodule"). A python file "utils.py" imported by the main executed file now performs "from mymodule import *" and gets the following exception:
System.ArgumentException was caught Message=An item with the same key has already been added. Source=mscorlib StackTrace: at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) at Microsoft.Scripting.Debugging.DebuggableLambdaBuilder.LayOutVariables(Di ctionary`2 strongBoxedLocals, Dictionary`2 parameters) at Microsoft.Scripting.Debugging.DebuggableLambdaBuilder.TransformLambda(La mbdaExpression lambda) at Microsoft.Scripting.Debugging.DebuggableLambdaBuilder.Transform(LambdaEx pression lambda) at Microsoft.Scripting.Debugging.CompilerServices.DebugContext.TransformLam bda(LambdaExpression lambda, DebugLambdaInfo lambdaInfo) at IronPython.Runtime.FunctionCode.<>c__DisplayClass1a.<GetGeneratorOrNorma lLambdaTracing>b__19(Expression`1 x) at IronPython.Compiler.GeneratorRewriter.Reduce(Boolean shouldInterpret, Boolean emitDebugSymbols, Int32 compilationThreshold, IList`1 parameters, Func`2 bodyConverter) at IronPython.Runtime.FunctionCode.GetGeneratorOrNormalLambdaTracing(Python Context context) at IronPython.Runtime.FunctionCode.UpdateDelegate(PythonContext context, Boolean forceCreation) at IronPython.Runtime.FunctionCode.LazyCompileFirstTarget(PythonFunction function) at IronPython.Compiler.PythonCallTargets.OriginalCallTarget4(PythonFunction function, Object arg0, Object arg1, Object arg2, Object arg3) at IronPython.Runtime.PythonFunction.FunctionCaller`1.Default3Call1(CallSit e site, CodeContext context, Object func, T0 arg0) at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) at ensure_tempdir$74(Closure , PythonFunction ) at IronPython.Compiler.PythonCallTargets.OriginalCallTarget0(PythonFunction function) at IronPython.Runtime.PythonFunction.FunctionCaller.Call0(CallSite site, CodeContext context, Object func) at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1) at Microsoft.Scripting.Interpreter.DynamicInstruction`3.Run(InterpretedFram e 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.SourceUnit.Execute(Scope scope) at Microsoft.Scripting.Hosting.ScriptSource.Execute(ScriptScope scope) at _3S.CoDeSys.ScriptEngine.ScriptExecutor.ExecuteInternal(ScriptSource source, IList`1 searchPath) in D:\AutomationPlatform\Implementation\Sources and Projects\ScriptEngine\ScriptExecutor.cs:line 189 InnerException: At the moment, I have no Idea how to solve this. Best regards Markus Schaber ___________________________ We software Automation. 3S-Smart Software Solutions GmbH Markus Schaber | Developer Memminger Str. 151 | 87439 Kempten | Germany | Tel. +49-831-54031-0 | Fax +49-831-54031-50 Email: m.scha...@3s-software.com | Web: http://www.3s-software.com CoDeSys internet forum: http://forum.3s-software.com Download CoDeSys sample projects: http://www.3s-software.com/index.shtml?sample_projects Managing Directors: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Trade register: Kempten HRB 6186 | Tax ID No.: DE 167014915 _______________________________________________ Ironpython-users mailing list Ironpython-users@python.org http://mail.python.org/mailman/listinfo/ironpython-users