Hi Mark, After much more testing here is some more to go on:
Background again: - I have a VisualBasic-generated ActiveX COM object called capiCrypto.clsCrypto - I call it like this clsCrypto = win32com.client.Dispatch("capiCrypto.clsCrypto") clsCrypto.InStringBuffer = newCert clsCrypto.CRLFileName = self.Request.FqdnCRL result = clsCrypto.CheckCertBufferAgainstCRLFile() - it was generated on WinXP SP2 - It can successfully be called from Python 2.3 win32-208 without problem - As soon as I upgrade to Python 2.7 I get this stack trace without touching the dll or its registration 2012/05/19 10:18:12 INFO Traceback (most recent call last): File "cherrypy\_cphttptools.pyo", line 271, in run File "cherrypy\_cphttptools.pyo", line 502, in main File "checkcertcrld.pyw", line 113, in crlHandler File "CrlDispatch.pyo", line 121, in handle File "CheckCertCrl.pyo", line 38, in execute File "<COMObject capiCrypto.clsCrypto>", line 3, in CheckCertBufferAgainstCRLFile com_error: (-2147417851, 'The server threw an exception.', None, None) Now here is some strange feedback . . . - Knowing that everything was OK with Python 2.3, I isolated the above code in its own HTTP process and py2exe'ed it thinking py2exe would preserve the whole 2.3 call environment - My thought was I would call the HTTP daemon which was packaged with 2.3 and 208 from my 2.7 environment both in their own py2exe-created exe's one in 2.7 the other in 2.3 - So check this, the very first call to the dll in the 2.3 exe from the 2.7 exe worked !!! Then all successive calls failed ???? - here is the log: 2012/05/19 08:53:28 INFO CheckCertCRL completed with TransactionStatus ===> 1763 and TransactionStatusString ==> Certificate Revocation Check failed Current time is NOT within the CRL validity period 2012/05/19 10:18:12 HTTP INFO 127.0.0.1 - POST /crlHandler HTTP/1.1 2012/05/19 10:18:12 INFO Traceback (most recent call last): File "cherrypy\_cphttptools.pyo", line 271, in run File "cherrypy\_cphttptools.pyo", line 502, in main File "checkcertcrld.pyw", line 113, in crlHandler File "CrlDispatch.pyo", line 121, in handle File "CheckCertCrl.pyo", line 38, in execute File "<COMObject capiCrypto.clsCrypto>", line 3, in CheckCertBufferAgainstCRLFile com_error: (-2147417851, 'The server threw an exception.', None, None) - Note the first call which successfully checked the revocation status of a certificate and returned a 1763 indicating a successful call to the COM dll (although the cert check failed) - Every subsequent time I called the dll it fails ??? - Something happened in the environment after the first call and I have no clue ??? Ed On Mon, May 14, 2012 at 8:50 AM, Mark Hammond <mhamm...@skippinet.com.au>wrote: > [re-adding python-win32 - please keep replies on list] > > > On 14/05/2012 10:39 PM, EdShallow wrote: > >> Hi Mark, >> >> Python 2.3 with pywin32-208 works. The error I receive reads >> "Object through and exception at line 3". >> > > How do you get that error? You say "my dll throws an exception > immediately upon entry" - I can't reconcile that "with the error I > receive". What does Python do when calling your failing DLL? (ie, do you > get a traceback? If so, please include it completely. If not, what result > does Python get? I'm still very unclear on the context of your problem. > > > Un-registering and re-registering the dll does not help. >> > > But that's just unregistering and re-registering your DLL right? > > > The test was conducted on the same machine after uninstalling >> Python and re-installing numerous combinations of Python 2.4, 2.5, 2.6, >> 2.7 with associated pywin32-208 thry pywin32-214. >> >> If I uninstall the newer Python and re-install Python 2.3 and >> pywin32-208 all is OK again. It is definitely environmental as opposed >> to the code. >> > > Well - it's *someone's* code :) To be clear, 2.3 + pywin32 209 fails? > > Mark > >> >> Thanks, >> Ed >> >> On Sun, May 13, 2012 at 9:07 PM, Mark Hammond <skippy.hamm...@gmail.com >> <mailto:skippy.hammond@gmail.**com <skippy.hamm...@gmail.com>>> wrote: >> >> You haven't given us enough information to help. What error do you >> see? What is the most recent combination of Python and pywin32 that >> works? >> >> Mark >> >> >> On 12/05/2012 10:31 PM, EdShallow wrote: >> >> Hi Folks, >> >> I have an ActiveX COM dll generated by VisualBasic 6 in >> WinXP. I >> can call it and use it successfully with Python 2.3 and pywin32-208 >> without problems. >> >> As soon as I upgrade either pywin32- or Python to anything >> itself >> to anything newer, my dll throws an exception immediately upon >> entry. >> >> Can anyone point me in a general direction with respect to >> addressing this incompatibility? >> >> Thanks, >> Ed >> >> -- >> Ed's Contact Information: >> Mobile Phone: 613-852-6410 <tel:613-852-6410> >> Gmail: ed.shal...@gmail.com <mailto:ed.shal...@gmail.com> >> <mailto:ed.shal...@gmail.com <mailto:ed.shal...@gmail.com>> >> VOIP Address: 107...@sip.ca1.voip.ms >> <mailto:107...@sip.ca1.voip.ms**> <mailto:107...@sip.ca1.voip.ms >> <mailto:107...@sip.ca1.voip.ms**>__> >> >> VOIP DID#: 613-458-5004 <tel:613-458-5004> >> Skype ID: edward.shallow >> Home Phone: 613-482-2090 <tel:613-482-2090> >> >> >> >> ______________________________**___________________ >> python-win32 mailing list >> python-win32@python.org >> <mailto:python-win32@python.**org<python-win32@python.org> >> > >> >> http://mail.python.org/__**mailman/listinfo/python-win32<http://mail.python.org/__mailman/listinfo/python-win32> >> >> >> <http://mail.python.org/**mailman/listinfo/python-win32<http://mail.python.org/mailman/listinfo/python-win32> >> > >> >> >> >> >> >> >> -- >> Ed's Contact Information: >> Mobile Phone: 613-852-6410 >> Gmail: ed.shal...@gmail.com <mailto:ed.shal...@gmail.com> >> VOIP Address: 107...@sip.ca1.voip.ms <mailto:107...@sip.ca1.voip.ms**> >> VOIP DID#: 613-458-5004 >> Skype ID: edward.shallow >> Home Phone: 613-482-2090 >> >> > > -- Ed's Contact Information: Mobile Phone: 613-852-6410 Gmail: ed.shal...@gmail.com VOIP Address: 107...@sip.ca1.voip.ms VOIP DID#: 613-458-5004 Skype ID: edward.shallow Home Phone: 613-482-2090
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32