[python-win32] automation error on VB CreateObject
Mark Hammond
mhammond at skippinet.com.au
Thu Jul 29 00:43:33 CEST 2004
I suggest you follow the steps for debugging Python COM objects - ie,
register with "--debug", and start the Pythonwin "Remote Trace Collector".
Hopefully this will cause the error to be dumped to Pythonwin, shedding some
light.
Mark
> -----Original Message-----
> From: python-win32-bounces+mhammond=keypoint.com.au at python.org
> [mailto:python-win32-bounces+mhammond=keypoint.com.au at python.org]On
> Behalf Of Emmanuel Breton
> Sent: Wednesday, 28 July 2004 11:47 PM
> To: python-win32 at python.org
> Subject: [python-win32] automation error on VB CreateObject
>
>
> Hi
>
> I have been trying to work arround an automation error for
> the second day and make no progress so far and would greatly
> appreciate your help :)
>
> Here is my problem: Any call to
> Set com_object = CreateObject("MyModule") throws a MsgBox
> with the following error:
> ----
> Runtime Error '-2147467259 (80004005)'
>
> Automation error
> Unspecified error
> ----
>
> I am working at a client's on Windows Server 2003 (python
> 2.3) with the Pack Office 2002 (same error from Excel or Word).
> What's weird is that the same code (both the python server
> and the VB client) works fine at work on a Windows 2000 OS
> (python 2.1).
>
> I have checked the Path and the PYTHONPATH,
> checked that I could Create my pythonCOM object from a python client:
> Win32com.client.Dispath("MyModule") works fine...
>
> I have also tried to rebuild a SimpleCOMServer and a simple
> client from Python Programming on Win32...
> without any more success however.
> (Still, when doing the same on my Win2000 environnement, it
> works great!)
>
> If you have any idea/suggestion/answer...
> Thanks
>
> Emmanuel
>
> Follow the code I have used for my tests:
>
> ----
> Class PythonUtilities:
> _public_methods_ = [ 'SplitString' ]
> _reg_progid_ = "PythonDemos.Utilities"
> _reg_clsid_ = unique_generated_clsid
>
> def SplitString(self, val, item=None):
> import string
> if item != None: item = str(item)
> return string.split(str(val), item)
>
> Here is the VB script (from the book too)
> ----
> Sub python_test()
> Set PythonUtils = CreateObject("PythonDemos.Utilities")
> response = PythonUtils.SplitString("Hello from VB")
> For Each Item In response
> MsgBox Item
> Next
> End Sub
>
> --
> Emmanuel Bréton LOGILAB,
> Paris (France)
> Tel: 01 45 32 03 12
http://www.logilab.org
More information about the Python-win32
mailing list