COM/MAPI changes from 1.52 -> 2.1?

Grant Edwards grante at visi.com
Tue May 29 16:45:43 EDT 2001


>I've installed Python 2.1 along with the latest Win32All, and
>my trusty Python MAPI mail-fetcher program now crashes:
>
>Traceback (most recent call last):
>  File "mfetch.py", line 330, in ?
>    fetcher.Logon()
>  File "mfetch.py", line 111, in Logon
>    self.session = win32com.client.Dispatch("MAPI.Session")
>  File "C:\Python21\win32com\client\__init__.py", line 94, in Dispatch
>    dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
>  File "C:\Python21\win32com\client\dynamic.py", line 80, in _GetGoodDispatchAndUserName
>    return (_GetGoodDispatch(IDispatch, clsctx), userName)
>  File "C:\Python21\win32com\client\dynamic.py", line 71, in _GetGoodDispatch
>    IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
>pywintypes.com_error: (-2147221005, 'Invalid class string', None, None)
>
>I have no idea if this is due to the Win98->Win2K transition or
>by the 1.52->2.1 transition. Can anybody point me to an example
>app that uses MAPI, or to hints for porting COM apps from 1.52
>to 2.1?

Never mind -- this is the crash you see if you don't have CDO
object support installed for MAPI.  CDO support used to be
installed by default with Outlook, but now it isn't.  After
installing CDO support, my program is happy.  

-- 
Grant Edwards                   grante             Yow!  This is PLEASANT!
                                  at               
                               visi.com            



More information about the Python-list mailing list