[python-win32] pywintypes Error

Antony Joseph antonyjoseph89 at gmail.com
Tue Jan 8 10:20:23 CET 2008


Hi,
Can anyone help me , what the problem ?
I am running this code in windows xp and outlook also installed in my
machine.

>>> from win32com.client import Dispatch
>>> s=Dispatch('Mapi.Session')

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python25\Lib\site-packages\win32com\client\__init__.py", line 95,
in Dispatch
    dispatch, userName =
dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
  File "C:\Python25\Lib\site-packages\win32com\client\dynamic.py", line 98,
in _GetGoodDispatchAndUserName
    return (_GetGoodDispatch(IDispatch, clsctx), userName)
  File "C:\Python25\Lib\site-packages\win32com\client\dynamic.py", line 78,
in _GetGoodDispatch
    IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx,
pythoncom.IID_IDispatch)
pywintypes.com_error: (-2147221005, 'Invalid class string', None, None)

Antony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20080108/59d685da/attachment.htm 


More information about the python-win32 mailing list