COM object registration

dsavitsk dsavitsk at e-coli.net
Wed Sep 18 13:45:13 EDT 2002


"Mark Hammond" <mhammond at skippinet.com.au> wrote in message
news:4J_h9.19439$Ee4.59690 at news-server.bigpond.net.au...
> dsavitsk wrote:
> >>>>a = win32com.client.Dispatch('ecp.MODULE_REGISTER2')
> >>>
> > Traceback (most recent call last):
> >   File "<interactive input>", line 1, in ?
> >   File "C:\Python\win32com\client\__init__.py", line 92, in Dispatch
> >     dispatch, userName =
> > dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
> >   File "C:\Python\win32com\client\dynamic.py", line 81, in
> > _GetGoodDispatchAndUserName
> >     return (_GetGoodDispatch(IDispatch, clsctx), userName)
> >   File "C:\Python\win32com\client\dynamic.py", line 72, in
_GetGoodDispatch
> >     IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx,
> > pythoncom.IID_IDispatch)
> > com_error: (-2147467259, 'Unspecified error', None, None)
>
> It is likely that an exception is being encountered that we can get at
> pretty easy.
>
> Add a named param "debug=1" to all UseCommandLine calls.  Then, on both
> machines, start Pythonwin and select the debug trace collector.  Rerun
> your tests and see if any additional interesting exceptions are reported.
>
> Mark.
>

This is the traceback, but I'm afraid it doesn't mean much to me.  It is the
error that I got when using a VB client and where I get the 'localserver'
notion.

in _Invoke_ with 1000 0 2 ()
in _Invoke_ with 1000 0 1 (u'MODULE_REGISTER2',)
Registered: ecp.MODULE_REGISTER2 (for debugging)
Object with win32trace dispatcher created (object=None)
Traceback (most recent call last):
  File "C:\Python\win32com\server\dispatcher.py", line 27, in
_CreateInstance_
    self.policy._CreateInstance_(clsid, reqIID)
  File "C:\Python\win32com\server\policy.py", line 199, in _CreateInstance_
    myob = call_func(classSpec)
  File "C:\Python\win32com\server\policy.py", line 634, in call_func
    return apply(resolve_func(spec), args)
  File "C:\Python\win32com\server\policy.py", line 624, in resolve_func
    return getattr(module, fname)
AttributeError: 'localserver' module has no attribute 'regmodule2'

-doug





More information about the Python-list mailing list