<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">This problem sounds familiar. Perhaps you guys are using .NET 2.0 with SP1 applied? Then this blog post of mine might help:<br><br>http://feihonghsu.blogspot.com/2008/02/pythonnet-20-for-net-sp1_15.html<br><br>If you want, you can try the binary that I made instead of applying the patch yourself.<br><br><br>--- On <b>Tue, 9/30/08, Dirk Krause <i><dirk.krause@pixelpark.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">From: Dirk Krause <dirk.krause@pixelpark.com><br>Subject: Re: [Python.NET] error messages<br>To: "Craig Farrow" <craig_farrow@sil.org><br>Cc: pythondotnet@python.org<br>Date: Tuesday, September 30, 2008, 8:50 AM<br><br><div id="yiv593598479"><title></title>
<div id="idOWAReplyText91230" dir="ltr">
<div dir="ltr"><font size="2" color="#000000" face="Arial">right you are again. splitter works here, too.</font></div>
<div dir="ltr"><font size="2" face="Arial"></font> </div>
<div dir="ltr"><font size="2" face="Arial">Can you confirm that helloform runs when you disable line 33?</font></div>
<div dir="ltr"> # Register the event handler<br> # self.button.Click += self.button_Click<br></div></div>
<div dir="ltr"><br>
<hr tabindex="-1">
<font size="2" face="Tahoma"><b>Von:</b> Craig Farrow [mailto:craig_farrow@sil.org]<br><b>Gesendet:</b> Di 30.09.2008 15:25<br><b>An:</b> Dirk Krause<br><b>Cc:</b> pythondotnet@python.org<br><b>Betreff:</b> Re: AW: [Python.NET] error messages<br></font><br></div>
<div>Ah, yes. On my system (Vista, Python 2.4 or 2.5, pythonnet-2.0-alpha2) only splitter.py works out of the three demos. I haven't tried to figure out why...<br><br>Craig.<br><br>9/30/2008 9:13 PM dï, Dirk Krause pi¨dimi¨:
<blockquote cite="" type="cite">
<div id="idOWAReplyText37734" dir="ltr">
<div dir="ltr"><font size="2" color="#000000" face="Arial">much better! ...python itself runs now.</font></div>
<div dir="ltr"> </div>
<div dir="ltr"><font size="2" color="#000000" face="Arial">but not really good either, trying to run helloform.py gives me:</font></div>
<div dir="ltr"> </div>
<div dir="ltr">D:\projects\pyov>helloform.py</div>
<div dir="ltr">Unbehandelte Ausnahme: System.TypeInitializationException: Der Typeninitialisierer für Python.Runtime.CodeGenerator hat<br>eine Ausnahme verursacht. ---> System.InvalidCastException: Das Objekt des Typs System.Reflection.Module kann nicht in T<br>yp System.Reflection.Emit.ModuleBuilder umgewandelt werden.<br> bei System.Reflection.Emit.AssemblyBuilderData.GetInMemoryAssemblyModule()<br> bei System.AppDomain.InternalDefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, String dir, Evide<br>nce evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions, St<br>ackCrawlMark& stackMark, IEnumerable`1 unsafeAssemblyAttributes)<br> bei System.AppDomain.DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access)<br> bei Python.Runtime.CodeGenerator..cctor()<br> --- Ende der internen
Ausnahmestapelüberwachung ---<br> bei Python.Runtime.DelegateManager.GetDispatcher(Type dtype)<br> bei Python.Runtime.DelegateManager.GetDelegate(Type dtype, IntPtr callable)<br> bei Python.Runtime.EventObject.AddEventHandler(IntPtr target, IntPtr handler)<br> bei Python.Runtime.EventBinding.nb_inplace_add(IntPtr ob, IntPtr arg)<br> bei Python.Runtime.Runtime.PyObject_Call(IntPtr pointer, IntPtr args, IntPtr kw)<br> bei Python.Runtime.MetaType.tp_call(IntPtr tp, IntPtr args, IntPtr kw)<br> bei Python.Runtime.Runtime.Py_Main(Int32 argc, String[] argv)<br> bei Python.Runtime.PythonConsole.Main(String[] args)</div></div>
<div dir="ltr"><br>
<hr tabindex="-1">
<font size="2" face="Tahoma"><b>Von:</b> Craig Farrow [<a rel="nofollow" class="moz-txt-link-freetext" target="_blank" href="mailto:craig_farrow@sil.org">mailto:craig_farrow@sil.org</a>]<br><b>Gesendet:</b> Di 30.09.2008 14:53<br><b>An:</b> Dirk Krause<br><b>Cc:</b> <a rel="nofollow" class="moz-txt-link-abbreviated" target="_blank" href="mailto:pythondotnet@python.org">pythondotnet@python.org</a><br><b>Betreff:</b> Re: [Python.NET] error messages<br></font><br></div>
<div>Try the UCS2 directory.<br><br>Craig.<br><br>9/30/2008 5:54 PM dï, Dirk Krause pi¨dimi¨:
<blockquote cite="" type="cite">
<div><font size="2" color="#000000" face="Arial">Hi,</font></div>
<div> </div>
<div><font size="2" face="Arial">I get the following error message when trying to run the python.exe from python2.5-UCS4 (I have a fully installed Python 2.5), any ideas? Vista professional here.</font></div>
<div> </div>
<div> </div>
<div><font size="2" color="#000000" face="Arial">... unfortunately in german:</font></div>
<div><font size="2" face="Arial">"""</font></div>
<div>Unbehandelte Ausnahme: System.IO.FileLoadException: Die Datei oder Assembly Python.Runtime, Version=0.0.0.0, Culture=neu<br>tral, PublicKeyToken=null oder eine Abhängigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assemb<br>ly stimmt nicht mit dem Assemblyverweis überein. (Ausnahme von HRESULT: 0x80131040)<br>Dateiname: Python.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null<br> bei Python.Runtime.Runtime.PyUnicode_FromUnicode(String s, Int32 size)<br> bei Python.Runtime.Runtime.Initialize()<br> bei Python.Runtime.PythonEngine.Initialize()<br> bei Python.Runtime.PythonConsole.Main(String[] args)</div>
<div>"""</div>
<div> </div>
<div>Thanks,</div>
<div> Dirk</div><pre><hr size="4" width="90%"><br>_________________________________________________<br>Python.NET mailing list - <a rel="nofollow" class="moz-txt-link-abbreviated" target="_blank" href="mailto:PythonDotNet@python.org">PythonDotNet@python.org</a><br><a rel="nofollow" class="moz-txt-link-freetext" target="_blank" href="http://mail.python.org/mailman/listinfo/pythondotnet">http://mail.python.org/mailman/listinfo/pythondotnet</a></pre></blockquote></div></blockquote></div></div><pre>_________________________________________________<br>Python.NET mailing list - PythonDotNet@python.org<br>http://mail.python.org/mailman/listinfo/pythondotnet</pre></blockquote></td></tr></table><br>