[Python.NET] Errors with Python.Net 2.0 SP 1

Nicolas Lelong nico_ml at mgdesign.fr
Thu Jan 24 11:54:58 CET 2008


Hi,

I have the same problem here since this morning, as XP installed automatically the .NET 2.0 SP 1 update.

Unit test 'leaktest.py' illustrated the problem ::

H:\temp\pythonnet\pythonnet_orig\src\tests>..\..\python.exe leaktest.py
Running module leak check...
  start: 16109568  end: 17137664 diff: +1028096

Running class leak check...

Unhandled Exception: System.TypeInitializationException: The type initializer for 'Python.Runtime.CodeGenerator' threw an exception. --
-> System.InvalidCastException: Unable to cast object of type 'System.Reflection.Module' to type 'System.Reflection.Emit.ModuleBuilder'.
   at System.Reflection.Emit.AssemblyBuilderData.GetInMemoryAssemblyModule()
   at System.AppDomain.InternalDefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, String dir, Evidence evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions, StackCrawlMark& stackMark, IEnumerable`1 unsafeAssemblyAttributes)
   at System.AppDomain.DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access)
   at Python.Runtime.CodeGenerator..cctor() in H:\temp\pythonnet\pythonnet_orig\src\runtime\codegenerator.cs:line 37
   --- End of inner exception stack trace ---
   at Python.Runtime.DelegateManager.GetDispatcher(Type dtype) in H:\temp\pythonnet\pythonnet_orig\src\runtime\delegatemanager.cs:line 79
   at Python.Runtime.DelegateManager.GetDelegate(Type dtype, IntPtr callable) in H:\temp\pythonnet\pythonnet_orig\src\runtime\delegatemanager.cs:line 168
   at Python.Runtime.DelegateObject.tp_new(IntPtr tp, IntPtr args, IntPtr kw) in H:\temp\pythonnet\pythonnet_orig\src\runtime\delegateobject.cs:line 74
   at e__NativeCall.Call_3(IntPtr , IntPtr , IntPtr , IntPtr )
   at Python.Runtime.MetaType.tp_call(IntPtr tp, IntPtr args, IntPtr kw) in H:\temp\pythonnet\pythonnet_orig\src\runtime\metatype.cs:line 156
   at Python.Runtime.Runtime.Py_Main(Int32 argc, String[] argv)
   at Python.Runtime.PythonConsole.Main(String[] args) in H:\temp\pythonnet\pythonnet_orig\src\console\pythonconsole.cs:line 24

I think, for now, I will uninstall this SP1...

Cheers,

Nicolas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythondotnet/attachments/20080124/fb2d3e36/attachment.htm 


More information about the PythonDotNet mailing list