IronPython'type'对象没有属性'NewMode'

时间:2014-02-18 13:43:52

标签: c# c#-4.0 ironpython

我的c#应用程序出现了令人困惑的错误,并且使用了ironpython进行了扩展。

以下代码:

self.Mask.Control.Mode = WindowState.NewMode

抛出此错误:

  

'type'对象没有属性'NewMode'

我的例外:

  

名称:NewDocument

     

异常:'type'对象没有属性'NewMode'

     

StackTrace:bei   IronPython.Runtime.Binding.MetaPythonType.FastGetBinderHelper.ErrorBinder.Target(CodeContext   context,Object self,Object&结果)bei   IronPython.Runtime.Types.TypeGetBase.RunDelegatesNoOptimize(对象   self,CodeContext context)bei   IronPython.Runtime.Types.SystemTypeGet.Target(CallSite site,Object   self,CodeContext context)bei   Microsoft.Scripting.Interpreter.DynamicInstruction 3.Run(InterpretedFrame frame) bei Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame frame) bei Microsoft.Scripting.Interpreter.LightLambda.Run3[T0,T1,T2,TRet](T0 arg0, T1 arg1, T2 arg2) bei IronPython.Runtime.FunctionCaller 2.Call2(CallSite站点,CodeContext   context,Object func,T0 arg0,T1 arg1)bei   IronPython.Runtime.Method.MethodBinding 1.SelfTarget(CallSite site, CodeContext context, Object target, T0 arg0) bei Microsoft.Scripting.Interpreter.DynamicInstruction 4.Run(InterpretedFrame   框架)bei   Microsoft.Scripting.Interpreter.Interpreter.Run(InterpretedFrame   框架)bei   Microsoft.Scripting.Interpreter.LightLambda.Run4 [T0,T1,T2,T3,TRET](T0   arg0,T1 arg1,T2 arg2,T3 arg3)bei   IronPython.Runtime.FunctionCaller`3.Call3(CallSite站点,CodeContext   context,Object func,T0 arg0,T1 arg1,T2 arg2)bei   CallSite.Target(Closure,CallSite,Object,Object,Object)bei   System.Dynamic.UpdateDelegates.UpdateAndExecute3 [T0,T1,T2,TRET](调用点   site,T0 arg0,T1 arg1,T2 arg2)bei CallSite.Target(Closure,   CallSite,Object,Object,Object)bei   System.Dynamic.UpdateDelegates.UpdateAndExecute3 [T0,T1,T2,TRET](调用点   site,T0 arg0,T1 arg1,T2 arg2)bei lambda_method(Closure,   DynamicOperations,CallSiteBinder,Object,Object [])bei   Microsoft.Scripting.Runtime.DynamicOperations.InvokeMember(Object obj,   String memberName,Boolean ignoreCase,Object [] parameters)bei   Microsoft.Scripting.Hosting.ObjectOperations.InvokeMember(Object obj,   String memberName,Object []参数)bei   ESS.MS.Framework.Script.IronPythonScript.CallFunction(Object Class,   String Method,Object [] Arguments)

问题是,我无法重现错误,有时会立即发生 有时它会在使用我的程序一小时后发生。

也许有人有个主意。

(我正在使用.Net 4.0和IronPython 2.7.4)

谢谢!

0 个答案:

没有答案