From bernt.brenna at gmail.com Fri Sep 12 10:26:24 2008 From: bernt.brenna at gmail.com (=?ISO-8859-1?Q?Bernt_R=F8skar_Brenna?=) Date: Fri, 12 Sep 2008 10:26:24 +0200 Subject: [Python.NET] Patch for python 2.5 + unicode support in 1.1 Message-ID: First of all, I am very new to Python.NET. I needed support for embedding python 2.5 in .NET 1.1 (the code is hosted in an app. server that is stuck on .NET 1.1 and is not likely to be upgraded anytime soon). So I made a few simple changes in the makefile and runtime files. And also in pyobject and pystring to make it unicode (see my question below). ---- One question: - PyString.IsStringType() returns false for objects. Is this the correct behaviour? I notice it also does this in trunk (.net2.0 - py2.5) - so I suppose my approach in the patch is wrong. In the patch, I change the impl. of IsStringType, so it returns true for unicode objects as well. ---- The patch is against branches\1.0-branch\pythonnet - Bernt Index: src/runtime/pyobject.cs =================================================================== --- src/runtime/pyobject.cs (revision 100) +++ src/runtime/pyobject.cs (working copy) @@ -96,9 +96,7 @@ public object AsManagedObject(Type t) { Object result; if (!Converter.ToManaged(this.Handle, t, out result, false)) { - throw new InvalidCastException( - "cannot convert object to target type" - ); + throw new InvalidCastException("cannot convert object to target type"); } return result; } @@ -819,7 +817,7 @@ /// public override string ToString() { - IntPtr strval = Runtime.PyObject_Str(obj); + IntPtr strval = Runtime.PyObject_Unicode(obj); string result = Runtime.GetManagedString(strval); Runtime.Decref(strval); return result; Index: src/runtime/pystring.cs =================================================================== --- src/runtime/pystring.cs (revision 100) +++ src/runtime/pystring.cs (working copy) @@ -59,7 +59,7 @@ /// public PyString(string s) : base() { - obj = Runtime.PyString_FromStringAndSize(s, s.Length); + obj = Runtime.PyUnicode_FromUnicode(s, s.Length); if (obj == IntPtr.Zero) { throw new PythonException(); } @@ -75,7 +75,7 @@ /// public static bool IsStringType(PyObject value) { - return Runtime.PyString_Check(value.obj); + return Runtime.IsStringType(value.obj); } } Index: src/runtime/runtime.cs =================================================================== --- src/runtime/runtime.cs (revision 100) +++ src/runtime/runtime.cs (working copy) @@ -23,7 +23,12 @@ /// before calling any of these methods. /// +#if PYVERSION24 internal const string dll = "python24"; +#endif +#if PYVERSION25 + internal const string dll = "python25"; +#endif internal static bool wrap_exceptions; internal static bool is32bit; @@ -605,6 +610,10 @@ internal unsafe static extern IntPtr PyObject_Str(IntPtr pointer); + [DllImport(Runtime.dll, CallingConvention = CallingConvention.Cdecl, + ExactSpelling = true, CharSet = CharSet.Ansi)] + internal unsafe static extern IntPtr + PyObject_Unicode(IntPtr pointer); [DllImport(Runtime.dll, CallingConvention=CallingConvention.Cdecl, ExactSpelling=true, CharSet=CharSet.Ansi)] Index: makefile =================================================================== --- makefile (revision 100) +++ makefile (working copy) @@ -1,6 +1,7 @@ # Makefile for the PythonRuntime .NET assembly and tests. Thanks to # Camilo Uribe for contributing Mono support. +PYVERSION=25 RELEASE=pythonnet-1.0-rc2-py2.4-clr1.1-src RUNNER= ILDASM=ildasm @@ -20,7 +21,7 @@ Python.Runtime.dll: callconvutil.exe cd src; cd runtime; \ $(CSC) /nologo /unsafe /target:library /out:../../Python.Runtime.dll \ - /recurse:*.cs + /recurse:*.cs /define:PYVERSION$(PYVERSION) cd ..; cd ..; $(ILDASM) /nobar Python.Runtime.dll /out=Python.Runtime.il; $(RUNNER) ./callconvutil.exe; -------------- next part -------------- A non-text attachment was scrubbed... Name: unicode_10-branch.patch Type: text/x-patch Size: 3115 bytes Desc: not available URL: From bernt.brenna at gmail.com Fri Sep 12 10:49:17 2008 From: bernt.brenna at gmail.com (=?ISO-8859-1?Q?Bernt_R=F8skar_Brenna?=) Date: Fri, 12 Sep 2008 10:49:17 +0200 Subject: [Python.NET] Adding support for .NET 1.1 i trunk - is it possible? Message-ID: At least for me it would be useful to have support for .NET 1.1. I am aware of the 1.0-branch, but I would like to benefit from the 2.5 and 2.6 work that has been done i trunk, as well as any bugfixes not merged from trunk to 1.0-branch. I am therefore looking into adding support for 1.1 in trunk. As I am new to Python.net, it would be nice if someone more knowledgeable had a quick peek at my planned approach. Would the following approach work?: - Where generics is used in Runtime, using conditional compilation to replace: List aList; aList = new List(); with List_of_string aList; aList = new List_of_string(); OR: Might possibly create sed scripts or similar to create *.net11.cs files with generics declarations replaced instead. The various List_of_ and Dictionary_of_ classes would be code generated and placed in a single code file. - Use conditional compilation to isolate all GenericUtil-related code. - Create makefile.net11 for build Does anyone have any advice to offer, reasons this approach won't work, insights into how the task is vastly more complicated than I think etc.? Bernt From rwan at ea.com Tue Sep 16 00:17:43 2008 From: rwan at ea.com (Wan, Ronald) Date: Mon, 15 Sep 2008 15:17:43 -0700 Subject: [Python.NET] Python.NET + Apache Message-ID: Hi, Has any had any success with integrating Python.NET with Apache? Python.NET works very well locally, say if I run the most basic thing like import clr in the python command line. However, when I try to do the same thing through apache, python always dumps out SystemError: dynamic module not initialized properly Currently, I'm running... Windows XP Apache Python 2.5 .NET Framework 2.0 The latest Python.NET release Does any have any suggestions of what I can do to fix this? Thanks! Thanks in advance, Ronald -------------- next part -------------- An HTML attachment was scrubbed... URL: From rwan at ea.com Tue Sep 16 01:05:42 2008 From: rwan at ea.com (Wan, Ronald) Date: Mon, 15 Sep 2008 16:05:42 -0700 Subject: [Python.NET] Python.NET + Apache Message-ID: Thanks for the reply Maksim. I'm still getting the same error even when I granted Full Trust to Local Intranet... don't know why... Thanks, Ronald From: Maksim Kozyarchuk [mailto:mkozyarchuk at hedgeserv.com] Sent: Monday, September 15, 2008 3:49 PM To: Wan, Ronald; pythondotnet at python.org Subject: Re: [Python.NET] Python.NET + Apache I've seen a similar error when running from the network, and it was due to a .NET Security policy. To isolate, you could try to change .NET Security Policy and grant Local Intranet a "Full Trust" Maksim On 9/15/08 6:17 PM, "Wan, Ronald" wrote: Hi, Has any had any success with integrating Python.NET with Apache? Python.NET works very well locally, say if I run the most basic thing like import clr in the python command line. However, when I try to do the same thing through apache, python always dumps out SystemError: dynamic module not initialized properly Currently, I'm running... Windows XP Apache Python 2.5 .NET Framework 2.0 The latest Python.NET release Does any have any suggestions of what I can do to fix this? Thanks! Thanks in advance, Ronald ________________________________ _________________________________________________ Python.NET mailing list - PythonDotNet at python.org http://mail.python.org/mailman/listinfo/pythondotnet -------------- next part -------------- An HTML attachment was scrubbed... URL: From mkozyarchuk at hedgeserv.com Tue Sep 16 00:48:40 2008 From: mkozyarchuk at hedgeserv.com (Maksim Kozyarchuk) Date: Mon, 15 Sep 2008 18:48:40 -0400 Subject: [Python.NET] Python.NET + Apache In-Reply-To: Message-ID: I?ve seen a similar error when running from the network, and it was due to a .NET Security policy. To isolate, you could try to change .NET Security Policy and grant Local Intranet a ?Full Trust? Maksim On 9/15/08 6:17 PM, "Wan, Ronald" wrote: > Hi, > > Has any had any success with integrating Python.NET with Apache? Python.NET > works very well locally, say if I run the most basic thing like > > import clr > > in the python command line. However, when I try to do the same thing through > apache, python always dumps out > > SystemError: dynamic module not initialized properly > > Currently, I?m running? > > Windows XP > > Apache > > Python 2.5 > > .NET Framework 2.0 > > The latest Python.NET release > > Does any have any suggestions of what I can do to fix this? Thanks! > > Thanks in advance, > > Ronald > > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > http://mail.python.org/mailman/listinfo/pythondotnet -------------- next part -------------- An HTML attachment was scrubbed... URL: From dirk.krause at pixelpark.com Tue Sep 30 11:54:19 2008 From: dirk.krause at pixelpark.com (Dirk Krause) Date: Tue, 30 Sep 2008 11:54:19 +0200 Subject: [Python.NET] error messages Message-ID: <72C1C9E5780A134F896530D480F22BB70214278F@hermes.bitlab.de> Hi, 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. ... unfortunately in german: """ Unbehandelte Ausnahme: System.IO.FileLoadException: Die Datei oder Assembly Python.Runtime, Version=0.0.0.0, Culture=neu tral, PublicKeyToken=null oder eine Abh?ngigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assemb ly stimmt nicht mit dem Assemblyverweis ?berein. (Ausnahme von HRESULT: 0x80131040) Dateiname: Python.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null bei Python.Runtime.Runtime.PyUnicode_FromUnicode(String s, Int32 size) bei Python.Runtime.Runtime.Initialize() bei Python.Runtime.PythonEngine.Initialize() bei Python.Runtime.PythonConsole.Main(String[] args) """ Thanks, Dirk -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig_farrow at sil.org Tue Sep 30 14:53:06 2008 From: craig_farrow at sil.org (Craig Farrow) Date: Tue, 30 Sep 2008 20:53:06 +0800 Subject: [Python.NET] error messages In-Reply-To: <72C1C9E5780A134F896530D480F22BB70214278F@hermes.bitlab.de> References: <72C1C9E5780A134F896530D480F22BB70214278F@hermes.bitlab.de> Message-ID: <48E22132.5020504@sil.org> Try the UCS2 directory. Craig. 9/30/2008 5:54 PM d?, Dirk Krause pi?dimi?: > Hi, > > 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. > > > ... unfortunately in german: > """ > Unbehandelte Ausnahme: System.IO.FileLoadException: Die Datei oder > Assembly Python.Runtime, Version=0.0.0.0, Culture=neu > tral, PublicKeyToken=null oder eine Abh?ngigkeit davon wurde nicht > gefunden. Die gefundene Manifestdefinition der Assemb > ly stimmt nicht mit dem Assemblyverweis ?berein. (Ausnahme von > HRESULT: 0x80131040) > Dateiname: Python.Runtime, Version=0.0.0.0, Culture=neutral, > PublicKeyToken=null > bei Python.Runtime.Runtime.PyUnicode_FromUnicode(String s, Int32 size) > bei Python.Runtime.Runtime.Initialize() > bei Python.Runtime.PythonEngine.Initialize() > bei Python.Runtime.PythonConsole.Main(String[] args) > """ > > Thanks, > Dirk > ------------------------------------------------------------------------ > > _________________________________________________ > Python.NET mailing list - PythonDotNet at python.org > http://mail.python.org/mailman/listinfo/pythondotnet -------------- next part -------------- An HTML attachment was scrubbed... URL: From dirk.krause at pixelpark.com Tue Sep 30 15:13:39 2008 From: dirk.krause at pixelpark.com (Dirk Krause) Date: Tue, 30 Sep 2008 15:13:39 +0200 Subject: [Python.NET] error messages References: <72C1C9E5780A134F896530D480F22BB70214278F@hermes.bitlab.de> <48E22132.5020504@sil.org> Message-ID: <72C1C9E5780A134F896530D480F22BB702142793@hermes.bitlab.de> much better! ...python itself runs now. but not really good either, trying to run helloform.py gives me: D:\projects\pyov>helloform.py Unbehandelte Ausnahme: System.TypeInitializationException: Der Typeninitialisierer f?r Python.Runtime.CodeGenerator hat eine Ausnahme verursacht. ---> System.InvalidCastException: Das Objekt des Typs System.Reflection.Module kann nicht in T yp System.Reflection.Emit.ModuleBuilder umgewandelt werden. bei System.Reflection.Emit.AssemblyBuilderData.GetInMemoryAssemblyModule() bei System.AppDomain.InternalDefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, String dir, Evide nce evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions, St ackCrawlMark& stackMark, IEnumerable`1 unsafeAssemblyAttributes) bei System.AppDomain.DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access) bei Python.Runtime.CodeGenerator..cctor() --- Ende der internen Ausnahmestapel?berwachung --- bei Python.Runtime.DelegateManager.GetDispatcher(Type dtype) bei Python.Runtime.DelegateManager.GetDelegate(Type dtype, IntPtr callable) bei Python.Runtime.EventObject.AddEventHandler(IntPtr target, IntPtr handler) bei Python.Runtime.EventBinding.nb_inplace_add(IntPtr ob, IntPtr arg) bei Python.Runtime.Runtime.PyObject_Call(IntPtr pointer, IntPtr args, IntPtr kw) bei Python.Runtime.MetaType.tp_call(IntPtr tp, IntPtr args, IntPtr kw) bei Python.Runtime.Runtime.Py_Main(Int32 argc, String[] argv) bei Python.Runtime.PythonConsole.Main(String[] args) ________________________________ Von: Craig Farrow [mailto:craig_farrow at sil.org] Gesendet: Di 30.09.2008 14:53 An: Dirk Krause Cc: pythondotnet at python.org Betreff: Re: [Python.NET] error messages Try the UCS2 directory. Craig. 9/30/2008 5:54 PM d?, Dirk Krause pisdimis: Hi, 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. ... unfortunately in german: """ Unbehandelte Ausnahme: System.IO.FileLoadException: Die Datei oder Assembly Python.Runtime, Version=0.0.0.0, Culture=neu tral, PublicKeyToken=null oder eine Abh?ngigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assemb ly stimmt nicht mit dem Assemblyverweis ?berein. (Ausnahme von HRESULT: 0x80131040) Dateiname: Python.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null bei Python.Runtime.Runtime.PyUnicode_FromUnicode(String s, Int32 size) bei Python.Runtime.Runtime.Initialize() bei Python.Runtime.PythonEngine.Initialize() bei Python.Runtime.PythonConsole.Main(String[] args) """ Thanks, Dirk ________________________________ _________________________________________________ Python.NET mailing list - PythonDotNet at python.org http://mail.python.org/mailman/listinfo/pythondotnet -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig_farrow at sil.org Tue Sep 30 15:25:10 2008 From: craig_farrow at sil.org (Craig Farrow) Date: Tue, 30 Sep 2008 21:25:10 +0800 Subject: [Python.NET] error messages In-Reply-To: <72C1C9E5780A134F896530D480F22BB702142793@hermes.bitlab.de> References: <72C1C9E5780A134F896530D480F22BB70214278F@hermes.bitlab.de> <48E22132.5020504@sil.org> <72C1C9E5780A134F896530D480F22BB702142793@hermes.bitlab.de> Message-ID: <48E228B6.2050203@sil.org> 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... Craig. 9/30/2008 9:13 PM d?, Dirk Krause pi?dimi?: > much better! ...python itself runs now. > > but not really good either, trying to run helloform.py gives me: > > D:\projects\pyov>helloform.py > Unbehandelte Ausnahme: System.TypeInitializationException: Der > Typeninitialisierer f?r Python.Runtime.CodeGenerator hat > eine Ausnahme verursacht. ---> System.InvalidCastException: Das Objekt > des Typs System.Reflection.Module kann nicht in T > yp System.Reflection.Emit.ModuleBuilder umgewandelt werden. > bei > System.Reflection.Emit.AssemblyBuilderData.GetInMemoryAssemblyModule() > bei System.AppDomain.InternalDefineDynamicAssembly(AssemblyName > name, AssemblyBuilderAccess access, String dir, Evide > nce evidence, PermissionSet requiredPermissions, PermissionSet > optionalPermissions, PermissionSet refusedPermissions, St > ackCrawlMark& stackMark, IEnumerable`1 unsafeAssemblyAttributes) > bei System.AppDomain.DefineDynamicAssembly(AssemblyName name, > AssemblyBuilderAccess access) > bei Python.Runtime.CodeGenerator..cctor() > --- Ende der internen Ausnahmestapel?berwachung --- > bei Python.Runtime.DelegateManager.GetDispatcher(Type dtype) > bei Python.Runtime.DelegateManager.GetDelegate(Type dtype, IntPtr > callable) > bei Python.Runtime.EventObject.AddEventHandler(IntPtr target, > IntPtr handler) > bei Python.Runtime.EventBinding.nb_inplace_add(IntPtr ob, IntPtr arg) > bei Python.Runtime.Runtime.PyObject_Call(IntPtr pointer, IntPtr > args, IntPtr kw) > bei Python.Runtime.MetaType.tp_call(IntPtr tp, IntPtr args, IntPtr kw) > bei Python.Runtime.Runtime.Py_Main(Int32 argc, String[] argv) > bei Python.Runtime.PythonConsole.Main(String[] args) > > ------------------------------------------------------------------------ > *Von:* Craig Farrow [mailto:craig_farrow at sil.org] > *Gesendet:* Di 30.09.2008 14:53 > *An:* Dirk Krause > *Cc:* pythondotnet at python.org > *Betreff:* Re: [Python.NET] error messages > > Try the UCS2 directory. > > Craig. > > 9/30/2008 5:54 PM d?, Dirk Krause pi?dimi?: >> Hi, >> >> 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. >> >> >> ... unfortunately in german: >> """ >> Unbehandelte Ausnahme: System.IO.FileLoadException: Die Datei oder >> Assembly Python.Runtime, Version=0.0.0.0, Culture=neu >> tral, PublicKeyToken=null oder eine Abh?ngigkeit davon wurde nicht >> gefunden. Die gefundene Manifestdefinition der Assemb >> ly stimmt nicht mit dem Assemblyverweis ?berein. (Ausnahme von >> HRESULT: 0x80131040) >> Dateiname: Python.Runtime, Version=0.0.0.0, Culture=neutral, >> PublicKeyToken=null >> bei Python.Runtime.Runtime.PyUnicode_FromUnicode(String s, Int32 size) >> bei Python.Runtime.Runtime.Initialize() >> bei Python.Runtime.PythonEngine.Initialize() >> bei Python.Runtime.PythonConsole.Main(String[] args) >> """ >> >> Thanks, >> Dirk >> ------------------------------------------------------------------------ >> >> _________________________________________________ >> Python.NET mailing list - PythonDotNet at python.org >> http://mail.python.org/mailman/listinfo/pythondotnet -------------- next part -------------- An HTML attachment was scrubbed... URL: From dirk.krause at pixelpark.com Tue Sep 30 15:50:38 2008 From: dirk.krause at pixelpark.com (Dirk Krause) Date: Tue, 30 Sep 2008 15:50:38 +0200 Subject: [Python.NET] error messages References: <72C1C9E5780A134F896530D480F22BB70214278F@hermes.bitlab.de> <48E22132.5020504@sil.org> <72C1C9E5780A134F896530D480F22BB702142793@hermes.bitlab.de> <48E228B6.2050203@sil.org> Message-ID: <72C1C9E5780A134F896530D480F22BB702142795@hermes.bitlab.de> right you are again. splitter works here, too. Can you confirm that helloform runs when you disable line 33? # Register the event handler # self.button.Click += self.button_Click ________________________________ Von: Craig Farrow [mailto:craig_farrow at sil.org] Gesendet: Di 30.09.2008 15:25 An: Dirk Krause Cc: pythondotnet at python.org Betreff: Re: AW: [Python.NET] error messages 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... Craig. 9/30/2008 9:13 PM d?, Dirk Krause pisdimis: much better! ...python itself runs now. but not really good either, trying to run helloform.py gives me: D:\projects\pyov>helloform.py Unbehandelte Ausnahme: System.TypeInitializationException: Der Typeninitialisierer f?r Python.Runtime.CodeGenerator hat eine Ausnahme verursacht. ---> System.InvalidCastException: Das Objekt des Typs System.Reflection.Module kann nicht in T yp System.Reflection.Emit.ModuleBuilder umgewandelt werden. bei System.Reflection.Emit.AssemblyBuilderData.GetInMemoryAssemblyModule() bei System.AppDomain.InternalDefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, String dir, Evide nce evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions, St ackCrawlMark& stackMark, IEnumerable`1 unsafeAssemblyAttributes) bei System.AppDomain.DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access) bei Python.Runtime.CodeGenerator..cctor() --- Ende der internen Ausnahmestapel?berwachung --- bei Python.Runtime.DelegateManager.GetDispatcher(Type dtype) bei Python.Runtime.DelegateManager.GetDelegate(Type dtype, IntPtr callable) bei Python.Runtime.EventObject.AddEventHandler(IntPtr target, IntPtr handler) bei Python.Runtime.EventBinding.nb_inplace_add(IntPtr ob, IntPtr arg) bei Python.Runtime.Runtime.PyObject_Call(IntPtr pointer, IntPtr args, IntPtr kw) bei Python.Runtime.MetaType.tp_call(IntPtr tp, IntPtr args, IntPtr kw) bei Python.Runtime.Runtime.Py_Main(Int32 argc, String[] argv) bei Python.Runtime.PythonConsole.Main(String[] args) ________________________________ Von: Craig Farrow [mailto:craig_farrow at sil.org] Gesendet: Di 30.09.2008 14:53 An: Dirk Krause Cc: pythondotnet at python.org Betreff: Re: [Python.NET] error messages Try the UCS2 directory. Craig. 9/30/2008 5:54 PM d?, Dirk Krause pisdimis: Hi, 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. ... unfortunately in german: """ Unbehandelte Ausnahme: System.IO.FileLoadException: Die Datei oder Assembly Python.Runtime, Version=0.0.0.0, Culture=neu tral, PublicKeyToken=null oder eine Abh?ngigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assemb ly stimmt nicht mit dem Assemblyverweis ?berein. (Ausnahme von HRESULT: 0x80131040) Dateiname: Python.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null bei Python.Runtime.Runtime.PyUnicode_FromUnicode(String s, Int32 size) bei Python.Runtime.Runtime.Initialize() bei Python.Runtime.PythonEngine.Initialize() bei Python.Runtime.PythonConsole.Main(String[] args) """ Thanks, Dirk ________________________________ _________________________________________________ Python.NET mailing list - PythonDotNet at python.org http://mail.python.org/mailman/listinfo/pythondotnet -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsu.feihong at yahoo.com Tue Sep 30 18:56:46 2008 From: hsu.feihong at yahoo.com (Feihong Hsu) Date: Tue, 30 Sep 2008 09:56:46 -0700 (PDT) Subject: [Python.NET] error messages In-Reply-To: <72C1C9E5780A134F896530D480F22BB702142795@hermes.bitlab.de> Message-ID: <816532.45079.qm@web34803.mail.mud.yahoo.com> This problem sounds familiar. Perhaps you guys are using .NET 2.0 with SP1 applied? Then this blog post of mine might help: http://feihonghsu.blogspot.com/2008/02/pythonnet-20-for-net-sp1_15.html If you want, you can try the binary that I made instead of applying the patch yourself. --- On Tue, 9/30/08, Dirk Krause wrote: From: Dirk Krause Subject: Re: [Python.NET] error messages To: "Craig Farrow" Cc: pythondotnet at python.org Date: Tuesday, September 30, 2008, 8:50 AM right you are again. splitter works here, too. ? Can you confirm that helloform runs when you disable line 33? ??????? # Register the event handler ??????? # self.button.Click += self.button_Click Von: Craig Farrow [mailto:craig_farrow at sil.org] Gesendet: Di 30.09.2008 15:25 An: Dirk Krause Cc: pythondotnet at python.org Betreff: Re: AW: [Python.NET] error messages 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... Craig. 9/30/2008 9:13 PM d?, Dirk Krause pi?dimi?: much better!?? ...python itself runs now. ? but not really good either, trying to run helloform.py gives me: ? D:\projects\pyov>helloform.py Unbehandelte Ausnahme: System.TypeInitializationException: Der Typeninitialisierer f?r Python.Runtime.CodeGenerator hat eine Ausnahme verursacht. ---> System.InvalidCastException: Das Objekt des Typs System.Reflection.Module kann nicht in T yp System.Reflection.Emit.ModuleBuilder umgewandelt werden. ?? bei System.Reflection.Emit.AssemblyBuilderData.GetInMemoryAssemblyModule() ?? bei System.AppDomain.InternalDefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, String dir, Evide nce evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions, St ackCrawlMark& stackMark, IEnumerable`1 unsafeAssemblyAttributes) ?? bei System.AppDomain.DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access) ?? bei Python.Runtime.CodeGenerator..cctor() ?? --- Ende der internen Ausnahmestapel?berwachung --- ?? bei Python.Runtime.DelegateManager.GetDispatcher(Type dtype) ?? bei Python.Runtime.DelegateManager.GetDelegate(Type dtype, IntPtr callable) ?? bei Python.Runtime.EventObject.AddEventHandler(IntPtr target, IntPtr handler) ?? bei Python.Runtime.EventBinding.nb_inplace_add(IntPtr ob, IntPtr arg) ?? bei Python.Runtime.Runtime.PyObject_Call(IntPtr pointer, IntPtr args, IntPtr kw) ?? bei Python.Runtime.MetaType.tp_call(IntPtr tp, IntPtr args, IntPtr kw) ?? bei Python.Runtime.Runtime.Py_Main(Int32 argc, String[] argv) ?? bei Python.Runtime.PythonConsole.Main(String[] args) Von: Craig Farrow [mailto:craig_farrow at sil.org] Gesendet: Di 30.09.2008 14:53 An: Dirk Krause Cc: pythondotnet at python.org Betreff: Re: [Python.NET] error messages Try the UCS2 directory. Craig. 9/30/2008 5:54 PM d?, Dirk Krause pi?dimi?: Hi, ? 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. ? ? ... unfortunately in german: """ Unbehandelte Ausnahme: System.IO.FileLoadException: Die Datei oder Assembly Python.Runtime, Version=0.0.0.0, Culture=neu tral, PublicKeyToken=null oder eine Abh?ngigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assemb ly stimmt nicht mit dem Assemblyverweis ?berein. (Ausnahme von HRESULT: 0x80131040) Dateiname: Python.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null ?? bei Python.Runtime.Runtime.PyUnicode_FromUnicode(String s, Int32 size) ?? bei Python.Runtime.Runtime.Initialize() ?? bei Python.Runtime.PythonEngine.Initialize() ?? bei Python.Runtime.PythonConsole.Main(String[] args) """ ? Thanks, ? Dirk _________________________________________________ Python.NET mailing list - PythonDotNet at python.org http://mail.python.org/mailman/listinfo/pythondotnet_________________________________________________ Python.NET mailing list - PythonDotNet at python.org http://mail.python.org/mailman/listinfo/pythondotnet -------------- next part -------------- An HTML attachment was scrubbed... URL: From dirk.krause at pixelpark.com Tue Sep 30 19:35:57 2008 From: dirk.krause at pixelpark.com (Dirk Krause) Date: Tue, 30 Sep 2008 19:35:57 +0200 Subject: [Python.NET] error messages References: <816532.45079.qm@web34803.mail.mud.yahoo.com> Message-ID: <72C1C9E5780A134F896530D480F22BB70214279D@hermes.bitlab.de> nah, doesnt work here: D:\projects\pyov>helloform.py Unbehandelte Ausnahme: System.IO.FileLoadException: Die Datei oder Assembly Python.Runtime, Version=2.0.0.2, Culture=neu tral, PublicKeyToken=64e14e845abf2e60 oder eine Abh?ngigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinitio n der Assembly stimmt nicht mit dem Assemblyverweis ?berein. (Ausnahme von HRESULT: 0x80131040) Dateiname: Python.Runtime, Version=2.0.0.2, Culture=neutral, PublicKeyToken=64e14e845abf2e60 bei Python.Runtime.PythonConsole.Main(String[] args) I probably have to compile it. Is there a way to find out which .NET version is installed? ________________________________ Von: Feihong Hsu [mailto:hsu.feihong at yahoo.com] Gesendet: Di 30.09.2008 18:56 An: Craig Farrow; Dirk Krause Cc: pythondotnet at python.org Betreff: Re: [Python.NET] error messages This problem sounds familiar. Perhaps you guys are using .NET 2.0 with SP1 applied? Then this blog post of mine might help: http://feihonghsu.blogspot.com/2008/02/pythonnet-20-for-net-sp1_15.html If you want, you can try the binary that I made instead of applying the patch yourself. --- On Tue, 9/30/08, Dirk Krause wrote: From: Dirk Krause Subject: Re: [Python.NET] error messages To: "Craig Farrow" Cc: pythondotnet at python.org Date: Tuesday, September 30, 2008, 8:50 AM right you are again. splitter works here, too. Can you confirm that helloform runs when you disable line 33? # Register the event handler # self.button.Click += self.button_Click ________________________________ Von: Craig Farrow [mailto:craig_farrow at sil.org] Gesendet: Di 30.09.2008 15:25 An: Dirk Krause Cc: pythondotnet at python.org Betreff: Re: AW: [Python.NET] error messages 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... Craig. 9/30/2008 9:13 PM d?, Dirk Krause pisdimis: much better! ...python itself runs now. but not really good either, trying to run helloform.py gives me: D:\projects\pyov>helloform.py Unbehandelte Ausnahme: System.TypeInitializationException: Der Typeninitialisierer f?r Python.Runtime.CodeGenerator hat eine Ausnahme verursacht. ---> System.InvalidCastException: Das Objekt des Typs System.Reflection.Module kann nicht in T yp System.Reflection.Emit.ModuleBuilder umgewandelt werden. bei System.Reflection.Emit.AssemblyBuilderData.GetInMemoryAssemblyModule() bei System.AppDomain.InternalDefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, String dir, Evide nce evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions, St ackCrawlMark& stackMark, IEnumerable`1 unsafeAssemblyAttributes) bei System.AppDomain.DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access) bei Python.Runtime.CodeGenerator..cctor() --- Ende der internen Ausnahmestapel?berwachung --- bei Python.Runtime.DelegateManager.GetDispatcher(Type dtype) bei Python.Runtime.DelegateManager.GetDelegate(Type dtype, IntPtr callable) bei Python.Runtime.EventObject.AddEventHandler(IntPtr target, IntPtr handler) bei Python.Runtime.EventBinding.nb_inplace_add(IntPtr ob, IntPtr arg) bei Python.Runtime.Runtime.PyObject_Call(IntPtr pointer, IntPtr args, IntPtr kw) bei Python.Runtime.MetaType.tp_call(IntPtr tp, IntPtr args, IntPtr kw) bei Python.Runtime.Runtime.Py_Main(Int32 argc, String[] argv) bei Python.Runtime.PythonConsole.Main(String[] args) ________________________________ Von: Craig Farrow [mailto:craig_farrow at sil.org] Gesendet: Di 30.09.2008 14:53 An: Dirk Krause Cc: pythondotnet at python.org Betreff: Re: [Python.NET] error messages Try the UCS2 directory. Craig. 9/30/2008 5:54 PM d?, Dirk Krause pisdimis: Hi, 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. ... unfortunately in german: """ Unbehandelte Ausnahme: System.IO.FileLoadException: Die Datei oder Assembly Python.Runtime, Version=0.0.0.0, Culture=neu tral, PublicKeyToken=null oder eine Abh?ngigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assemb ly stimmt nicht mit dem Assemblyverweis ?berein. (Ausnahme von HRESULT: 0x80131040) Dateiname: Python.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null bei Python.Runtime.Runtime.PyUnicode_FromUnicode(String s, Int32 size) bei Python.Runtime.Runtime.Initialize() bei Python.Runtime.PythonEngine.Initialize() bei Python.Runtime.PythonConsole.Main(String[] args) """ Thanks, Dirk ________________________________ _________________________________________________ Python.NET mailing list - PythonDotNet at python.org http://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET mailing list - PythonDotNet at python.org http://mail.python.org/mailman/listinfo/pythondotnet -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsu.feihong at yahoo.com Tue Sep 30 20:44:33 2008 From: hsu.feihong at yahoo.com (Feihong Hsu) Date: Tue, 30 Sep 2008 11:44:33 -0700 (PDT) Subject: [Python.NET] error messages In-Reply-To: <72C1C9E5780A134F896530D480F22BB70214279D@hermes.bitlab.de> Message-ID: <475454.68582.qm@web34802.mail.mud.yahoo.com> Usually you can find a clue by looking in Control Panel > Add/Remove Programs. If you got SP1 or something like that, it'll be listed. --- On Tue, 9/30/08, Dirk Krause wrote: From: Dirk Krause Subject: AW: [Python.NET] error messages To: "Feihong Hsu" , "Craig Farrow" Cc: pythondotnet at python.org Date: Tuesday, September 30, 2008, 12:35 PM nah, doesnt work here: D:\projects\pyov>helloform.py Unbehandelte Ausnahme: System.IO.FileLoadException: Die Datei oder Assembly Python.Runtime, Version=2.0.0.2, Culture=neu tral, PublicKeyToken=64e14e845abf2e60 oder eine Abh?ngigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinitio n der Assembly stimmt nicht mit dem Assemblyverweis ?berein. (Ausnahme von HRESULT: 0x80131040) Dateiname: Python.Runtime, Version=2.0.0.2, Culture=neutral, PublicKeyToken=64e14e845abf2e60 ?? bei Python.Runtime.PythonConsole.Main(String[] args) ? I probably have to compile it. ? Is there a way to find out which .NET version is installed? Von: Feihong Hsu [mailto:hsu.feihong at yahoo.com] Gesendet: Di 30.09.2008 18:56 An: Craig Farrow; Dirk Krause Cc: pythondotnet at python.org Betreff: Re: [Python.NET] error messages This problem sounds familiar. Perhaps you guys are using .NET 2.0 with SP1 applied? Then this blog post of mine might help: http://feihonghsu.blogspot.com/2008/02/pythonnet-20-for-net-sp1_15.html If you want, you can try the binary that I made instead of applying the patch yourself. --- On Tue, 9/30/08, Dirk Krause wrote: From: Dirk Krause Subject: Re: [Python.NET] error messages To: "Craig Farrow" Cc: pythondotnet at python.org Date: Tuesday, September 30, 2008, 8:50 AM right you are again. splitter works here, too. ? Can you confirm that helloform runs when you disable line 33? ??????? # Register the event handler ??????? # self.button.Click += self.button_Click Von: Craig Farrow [mailto:craig_farrow at sil.org] Gesendet: Di 30.09.2008 15:25 An: Dirk Krause Cc: pythondotnet at python.org Betreff: Re: AW: [Python.NET] error messages 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... Craig. 9/30/2008 9:13 PM d?, Dirk Krause pi?dimi?: much better!?? ...python itself runs now. ? but not really good either, trying to run helloform.py gives me: ? D:\projects\pyov>helloform.py Unbehandelte Ausnahme: System.TypeInitializationException: Der Typeninitialisierer f?r Python.Runtime.CodeGenerator hat eine Ausnahme verursacht. ---> System.InvalidCastException: Das Objekt des Typs System.Reflection.Module kann nicht in T yp System.Reflection.Emit.ModuleBuilder umgewandelt werden. ?? bei System.Reflection.Emit.AssemblyBuilderData.GetInMemoryAssemblyModule() ?? bei System.AppDomain.InternalDefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, String dir, Evide nce evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions, St ackCrawlMark& stackMark, IEnumerable`1 unsafeAssemblyAttributes) ?? bei System.AppDomain.DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access) ?? bei Python.Runtime.CodeGenerator..cctor() ?? --- Ende der internen Ausnahmestapel?berwachung --- ?? bei Python.Runtime.DelegateManager.GetDispatcher(Type dtype) ?? bei Python.Runtime.DelegateManager.GetDelegate(Type dtype, IntPtr callable) ?? bei Python.Runtime.EventObject.AddEventHandler(IntPtr target, IntPtr handler) ?? bei Python.Runtime.EventBinding.nb_inplace_add(IntPtr ob, IntPtr arg) ?? bei Python.Runtime.Runtime.PyObject_Call(IntPtr pointer, IntPtr args, IntPtr kw) ?? bei Python.Runtime.MetaType.tp_call(IntPtr tp, IntPtr args, IntPtr kw) ?? bei Python.Runtime.Runtime.Py_Main(Int32 argc, String[] argv) ?? bei Python.Runtime.PythonConsole.Main(String[] args) Von: Craig Farrow [mailto:craig_farrow at sil.org] Gesendet: Di 30.09.2008 14:53 An: Dirk Krause Cc: pythondotnet at python.org Betreff: Re: [Python.NET] error messages Try the UCS2 directory. Craig. 9/30/2008 5:54 PM d?, Dirk Krause pi?dimi?: Hi, ? 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. ? ? ... unfortunately in german: """ Unbehandelte Ausnahme: System.IO.FileLoadException: Die Datei oder Assembly Python.Runtime, Version=0.0.0.0, Culture=neu tral, PublicKeyToken=null oder eine Abh?ngigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assemb ly stimmt nicht mit dem Assemblyverweis ?berein. (Ausnahme von HRESULT: 0x80131040) Dateiname: Python.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null ?? bei Python.Runtime.Runtime.PyUnicode_FromUnicode(String s, Int32 size) ?? bei Python.Runtime.Runtime.Initialize() ?? bei Python.Runtime.PythonEngine.Initialize() ?? bei Python.Runtime.PythonConsole.Main(String[] args) """ ? Thanks, ? Dirk _________________________________________________ Python.NET mailing list - PythonDotNet at python.org http://mail.python.org/mailman/listinfo/pythondotnet_________________________________________________ Python.NET mailing list - PythonDotNet at python.org http://mail.python.org/mailman/listinfo/pythondotnet -------------- next part -------------- An HTML attachment was scrubbed... URL: From dirk.krause at pixelpark.com Tue Sep 30 20:57:29 2008 From: dirk.krause at pixelpark.com (Dirk Krause) Date: Tue, 30 Sep 2008 20:57:29 +0200 Subject: [Python.NET] error messages References: <475454.68582.qm@web34802.mail.mud.yahoo.com> Message-ID: <72C1C9E5780A134F896530D480F22BB70214279F@hermes.bitlab.de> hmmm ... I have SP1 for sure, but also .NET 3.5 - maybe that is the problem? ________________________________ Von: Feihong Hsu [mailto:hsu.feihong at yahoo.com] Gesendet: Di 30.09.2008 20:44 An: Craig Farrow; Dirk Krause Cc: pythondotnet at python.org Betreff: Re: AW: [Python.NET] error messages Usually you can find a clue by looking in Control Panel > Add/Remove Programs. If you got SP1 or something like that, it'll be listed. --- On Tue, 9/30/08, Dirk Krause wrote: From: Dirk Krause Subject: AW: [Python.NET] error messages To: "Feihong Hsu" , "Craig Farrow" Cc: pythondotnet at python.org Date: Tuesday, September 30, 2008, 12:35 PM nah, doesnt work here: D:\projects\pyov>helloform.py Unbehandelte Ausnahme: System.IO.FileLoadException: Die Datei oder Assembly Python.Runtime, Version=2.0.0.2, Culture=neu tral, PublicKeyToken=64e14e845abf2e60 oder eine Abh?ngigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinitio n der Assembly stimmt nicht mit dem Assemblyverweis ?berein. (Ausnahme von HRESULT: 0x80131040) Dateiname: Python.Runtime, Version=2.0.0.2, Culture=neutral, PublicKeyToken=64e14e845abf2e60 bei Python.Runtime.PythonConsole.Main(String[] args) I probably have to compile it. Is there a way to find out which .NET version is installed? ________________________________ Von: Feihong Hsu [mailto:hsu.feihong at yahoo.com] Gesendet: Di 30.09.2008 18:56 An: Craig Farrow; Dirk Krause Cc: pythondotnet at python.org Betreff: Re: [Python.NET] error messages This problem sounds familiar. Perhaps you guys are using .NET 2.0 with SP1 applied? Then this blog post of mine might help: http://feihonghsu.blogspot.com/2008/02/pythonnet-20-for-net-sp1_15.html If you want, you can try the binary that I made instead of applying the patch yourself. --- On Tue, 9/30/08, Dirk Krause wrote: From: Dirk Krause Subject: Re: [Python.NET] error messages To: "Craig Farrow" Cc: pythondotnet at python.org Date: Tuesday, September 30, 2008, 8:50 AM right you are again. splitter works here, too. Can you confirm that helloform runs when you disable line 33? # Register the event handler # self.button.Click += self.button_Click ________________________________ Von: Craig Farrow [mailto:craig_farrow at sil.org] Gesendet: Di 30.09.2008 15:25 An: Dirk Krause Cc: pythondotnet at python.org Betreff: Re: AW: [Python.NET] error messages 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... Craig. 9/30/2008 9:13 PM d?, Dirk Krause pisdimis: much better! ...python itself runs now. but not really good either, trying to run helloform.py gives me: D:\projects\pyov>helloform.py Unbehandelte Ausnahme: System.TypeInitializationException: Der Typeninitialisierer f?r Python.Runtime.CodeGenerator hat eine Ausnahme verursacht. ---> System.InvalidCastException: Das Objekt des Typs System.Reflection.Module kann nicht in T yp System.Reflection.Emit.ModuleBuilder umgewandelt werden. bei System.Reflection.Emit.AssemblyBuilderData.GetInMemoryAssemblyModule() bei System.AppDomain.InternalDefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, String dir, Evide nce evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions, St ackCrawlMark& stackMark, IEnumerable`1 unsafeAssemblyAttributes) bei System.AppDomain.DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access) bei Python.Runtime.CodeGenerator..cctor() --- Ende der internen Ausnahmestapel?berwachung --- bei Python.Runtime.DelegateManager.GetDispatcher(Type dtype) bei Python.Runtime.DelegateManager.GetDelegate(Type dtype, IntPtr callable) bei Python.Runtime.EventObject.AddEventHandler(IntPtr target, IntPtr handler) bei Python.Runtime.EventBinding.nb_inplace_add(IntPtr ob, IntPtr arg) bei Python.Runtime.Runtime.PyObject_Call(IntPtr pointer, IntPtr args, IntPtr kw) bei Python.Runtime.MetaType.tp_call(IntPtr tp, IntPtr args, IntPtr kw) bei Python.Runtime.Runtime.Py_Main(Int32 argc, String[] argv) bei Python.Runtime.PythonConsole.Main(String[] args) ________________________________ Von: Craig Farrow [mailto:craig_farrow at sil.org] Gesendet: Di 30.09.2008 14:53 An: Dirk Krause Cc: pythondotnet at python.org Betreff: Re: [Python.NET] error messages Try the UCS2 directory. Craig. 9/30/2008 5:54 PM d?, Dirk Krause pisdimis: Hi, 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. ... unfortunately in german: """ Unbehandelte Ausnahme: System.IO.FileLoadException: Die Datei oder Assembly Python.Runtime, Version=0.0.0.0, Culture=neu tral, PublicKeyToken=null oder eine Abh?ngigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assemb ly stimmt nicht mit dem Assemblyverweis ?berein. (Ausnahme von HRESULT: 0x80131040) Dateiname: Python.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null bei Python.Runtime.Runtime.PyUnicode_FromUnicode(String s, Int32 size) bei Python.Runtime.Runtime.Initialize() bei Python.Runtime.PythonEngine.Initialize() bei Python.Runtime.PythonConsole.Main(String[] args) """ Thanks, Dirk ________________________________ _________________________________________________ Python.NET mailing list - PythonDotNet at python.org http://mail.python.org/mailman/listinfo/pythondotnet _________________________________________________ Python.NET mailing list - PythonDotNet at python.org http://mail.python.org/mailman/listinfo/pythondotnet -------------- next part -------------- An HTML attachment was scrubbed... URL: From hsu.feihong at yahoo.com Tue Sep 30 21:05:55 2008 From: hsu.feihong at yahoo.com (Feihong Hsu) Date: Tue, 30 Sep 2008 12:05:55 -0700 (PDT) Subject: [Python.NET] error messages In-Reply-To: <72C1C9E5780A134F896530D480F22BB70214279F@hermes.bitlab.de> Message-ID: <281268.38625.qm@web34803.mail.mud.yahoo.com> I have .NET 3.5 too, and I don't see any strange errors. From your error, it looks like it's having a hard time loading the required assemblies, but I'm not fluent in German so it's just a guess on my part. --- On Tue, 9/30/08, Dirk Krause wrote: From: Dirk Krause Subject: AW: AW: [Python.NET] error messages To: "Feihong Hsu" , "Craig Farrow" Cc: pythondotnet at python.org Date: Tuesday, September 30, 2008, 1:57 PM hmmm ...?I have SP1 for sure, but also .NET 3.5 - maybe that is the problem? Von: Feihong Hsu [mailto:hsu.feihong at yahoo.com] Gesendet: Di 30.09.2008 20:44 An: Craig Farrow; Dirk Krause Cc: pythondotnet at python.org Betreff: Re: AW: [Python.NET] error messages Usually you can find a clue by looking in Control Panel > Add/Remove Programs. If you got SP1 or something like that, it'll be listed. --- On Tue, 9/30/08, Dirk Krause wrote: From: Dirk Krause Subject: AW: [Python.NET] error messages To: "Feihong Hsu" , "Craig Farrow" Cc: pythondotnet at python.org Date: Tuesday, September 30, 2008, 12:35 PM nah, doesnt work here: D:\projects\pyov>helloform.py Unbehandelte Ausnahme: System.IO.FileLoadException: Die Datei oder Assembly Python.Runtime, Version=2.0.0.2, Culture=neu tral, PublicKeyToken=64e14e845abf2e60 oder eine Abh?ngigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinitio n der Assembly stimmt nicht mit dem Assemblyverweis ?berein. (Ausnahme von HRESULT: 0x80131040) Dateiname: Python.Runtime, Version=2.0.0.2, Culture=neutral, PublicKeyToken=64e14e845abf2e60 ?? bei Python.Runtime.PythonConsole.Main(String[] args) ? I probably have to compile it. ? Is there a way to find out which .NET version is installed? Von: Feihong Hsu [mailto:hsu.feihong at yahoo.com] Gesendet: Di 30.09.2008 18:56 An: Craig Farrow; Dirk Krause Cc: pythondotnet at python.org Betreff: Re: [Python.NET] error messages This problem sounds familiar. Perhaps you guys are using .NET 2.0 with SP1 applied? Then this blog post of mine might help: http://feihonghsu.blogspot.com/2008/02/pythonnet-20-for-net-sp1_15.html If you want, you can try the binary that I made instead of applying the patch yourself. --- On Tue, 9/30/08, Dirk Krause wrote: From: Dirk Krause Subject: Re: [Python.NET] error messages To: "Craig Farrow" Cc: pythondotnet at python.org Date: Tuesday, September 30, 2008, 8:50 AM right you are again. splitter works here, too. ? Can you confirm that helloform runs when you disable line 33? ??????? # Register the event handler ??????? # self.button.Click += self.button_Click Von: Craig Farrow [mailto:craig_farrow at sil.org] Gesendet: Di 30.09.2008 15:25 An: Dirk Krause Cc: pythondotnet at python.org Betreff: Re: AW: [Python.NET] error messages 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... Craig. 9/30/2008 9:13 PM d?, Dirk Krause pi?dimi?: much better!?? ...python itself runs now. ? but not really good either, trying to run helloform.py gives me: ? D:\projects\pyov>helloform.py Unbehandelte Ausnahme: System.TypeInitializationException: Der Typeninitialisierer f?r Python.Runtime.CodeGenerator hat eine Ausnahme verursacht. ---> System.InvalidCastException: Das Objekt des Typs System.Reflection.Module kann nicht in T yp System.Reflection.Emit.ModuleBuilder umgewandelt werden. ?? bei System.Reflection.Emit.AssemblyBuilderData.GetInMemoryAssemblyModule() ?? bei System.AppDomain.InternalDefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, String dir, Evide nce evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions, St ackCrawlMark& stackMark, IEnumerable`1 unsafeAssemblyAttributes) ?? bei System.AppDomain.DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access) ?? bei Python.Runtime.CodeGenerator..cctor() ?? --- Ende der internen Ausnahmestapel?berwachung --- ?? bei Python.Runtime.DelegateManager.GetDispatcher(Type dtype) ?? bei Python.Runtime.DelegateManager.GetDelegate(Type dtype, IntPtr callable) ?? bei Python.Runtime.EventObject.AddEventHandler(IntPtr target, IntPtr handler) ?? bei Python.Runtime.EventBinding.nb_inplace_add(IntPtr ob, IntPtr arg) ?? bei Python.Runtime.Runtime.PyObject_Call(IntPtr pointer, IntPtr args, IntPtr kw) ?? bei Python.Runtime.MetaType.tp_call(IntPtr tp, IntPtr args, IntPtr kw) ?? bei Python.Runtime.Runtime.Py_Main(Int32 argc, String[] argv) ?? bei Python.Runtime.PythonConsole.Main(String[] args) Von: Craig Farrow [mailto:craig_farrow at sil.org] Gesendet: Di 30.09.2008 14:53 An: Dirk Krause Cc: pythondotnet at python.org Betreff: Re: [Python.NET] error messages Try the UCS2 directory. Craig. 9/30/2008 5:54 PM d?, Dirk Krause pi?dimi?: Hi, ? 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. ? ? ... unfortunately in german: """ Unbehandelte Ausnahme: System.IO.FileLoadException: Die Datei oder Assembly Python.Runtime, Version=0.0.0.0, Culture=neu tral, PublicKeyToken=null oder eine Abh?ngigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assemb ly stimmt nicht mit dem Assemblyverweis ?berein. (Ausnahme von HRESULT: 0x80131040) Dateiname: Python.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null ?? bei Python.Runtime.Runtime.PyUnicode_FromUnicode(String s, Int32 size) ?? bei Python.Runtime.Runtime.Initialize() ?? bei Python.Runtime.PythonEngine.Initialize() ?? bei Python.Runtime.PythonConsole.Main(String[] args) """ ? Thanks, ? Dirk _________________________________________________ Python.NET mailing list - PythonDotNet at python.org http://mail.python.org/mailman/listinfo/pythondotnet_________________________________________________ Python.NET mailing list - PythonDotNet at python.org http://mail.python.org/mailman/listinfo/pythondotnet -------------- next part -------------- An HTML attachment was scrubbed... URL: