[python-win32] Problem after running MakePy

Rudy Schockaert rudy.schockaert at gmail.com
Fri Dec 9 10:04:01 CET 2005


I have a python program that does some things on Exchange mailboxes. I use
the MAPI.Session object for this and create it like this:


PythonWin 2.4.2 (#67, Oct 30 2005, 16:11:18) [MSC v.1310 32 bit (Intel)] on
win32.
Portions Copyright 1994-2004 Mark Hammond (mhammond at skippinet.com.au) - see
'Help/About PythonWin' for further copyright information.
>>> import win32com.client
>>> MAPISession = win32com.client.Dispatch("MAPI.Session")
>>> MAPISession.Logon()
>>> for infostores in MAPISession.InfoStores:
...     print infostores.Name
...
Public Folders
Mailbox - Rudy Schockaert
>>>
----------------------

If I now use makepy to create a genpy for the CDO 1.21 library (MAPI.Session)
I get the following result:

PythonWin 2.4.2 (#67, Oct 30 2005, 16:11:18) [MSC v.1310 32 bit (Intel)] on
win32.
Portions Copyright 1994-2004 Mark Hammond (mhammond at skippinet.com.au) - see
'Help/About PythonWin' for further copyright information.
>>> import win32com.client
>>> MAPISession = win32com.client.Dispatch("MAPI.Session")
>>> MAPISession.Logon()
>>> for infostores in MAPISession.InfoStores:
...     print infostores.Name
...
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
  File "C:\Python24\lib\site-packages\win32com\gen_py\3FA7DEA7-
6438-101B-ACC1-00AA00423326x0x1x21.py", line 3039, in __getitem__
    return self._get_good_object_(self._oleobj_.Invoke(*(21, LCID, 2, 1,
item)), "Item")
com_error: (-2147352565, 'Invalid index.', None, None)

----------------------

Am I doing something wrong? Forgetting something? Can someone explain this?

Thanks in advance,

Rudy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20051209/81ddb028/attachment.htm


More information about the Python-win32 mailing list