<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2769" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=521235305-10112005><FONT face=Arial color=#0000ff size=2>Sorry
for the delay! I think you may find this is a problem with pywin32 on
Python 2.4. I'll look at it as I find time, but for now, try Python
2.3.</FONT></SPAN></DIV>
<DIV><SPAN class=521235305-10112005><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=521235305-10112005><FONT face=Arial color=#0000ff
size=2>Mark</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
python-win32-bounces@python.org [mailto:python-win32-bounces@python.org]<B>On
Behalf Of </B>McBurnett, Roe D<BR><B>Sent:</B> Friday, 4 November 2005 8:40
AM<BR><B>To:</B> python-win32@python.org<BR><B>Subject:</B> [python-win32]
n00b problems accessing Outlook<BR><BR></FONT></DIV>
<DIV><SPAN class=275472221-03112005><FONT face=Arial>Hi
People,</FONT></SPAN></DIV>
<DIV><SPAN class=275472221-03112005><FONT
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=275472221-03112005><FONT face=Arial>I am new to Python, just
installed the ActivePython 2.4.1 and downloaded
pywin32-205.win32-py2.4.exe.</FONT></SPAN></DIV>
<DIV><SPAN class=275472221-03112005><FONT
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=275472221-03112005><FONT face=Arial>I executed the provided
demo application outlookAddin.py and got the following error message:</DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV><FONT
face="Courier New">C:\Python24\Lib\site-packages\win32com\demos>outlookAddin<BR>Traceback
(most recent call last):<BR> File
"C:\Python24\Lib\site-packages\win32com\demos\outlookAddin.py", line 38,in
?<BR>
gencache.EnsureModule('{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}', 0, 2, 1,
bForDemand=True) # Office 9<BR> File
"C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 407,
in EnsureModule<BR> module =
GetModuleForTypelib(typelibCLSID, tlbAttr[1], tlbAttr[3],
tlbAttr[4])<BR> File
"C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 258,
in GetModuleForTypelib<BR> mod =
_GetModule(modName)<BR> File
"C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 629,
in _GetModule<BR> mod =
__import__(mod_name)<BR> File
"C:\Python24\lib\site-packages\win32com\gen_py\2DF8D04C-5BFA-101B-BDE5-00AA0044DE52x0x2x2\__init__.py",
line
1691<BR>win32com.client.constants.__dicts__.append(constants.__dict__)<BR>
^<BR>SyntaxError: invalid syntax</FONT></DIV>
<DIV><FONT face="Courier New"></FONT> </DIV>
<DIV><FONT
face="Courier New">C:\Python24\Lib\site-packages\win32com\demos>outlookAddin</FONT></DIV></BLOCKQUOTE>
<DIV dir=ltr><SPAN class=275472221-03112005>I edited the <FONT
face="Courier New">"C:\Python24\lib\site-packages\win32com\gen_py\2DF8D04C-5BFA-101B-BDE5-00AA0044DE52x0x2x2\__init__.py"
</FONT><FONT face=Arial>file to remove a few comment lines and re-executed
with the following results:</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV dir=ltr><SPAN class=275472221-03112005><FONT
face="Courier New">C:\Python24\Lib\site-packages\win32com\demos>outlookAddin<BR>Registered:
Python.Test.OutlookAddin</FONT></SPAN></DIV></BLOCKQUOTE>
<DIV dir=ltr><SPAN class=275472221-03112005>So I followed the instructions in
the module:</SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV dir=ltr><SPAN class=275472221-03112005># To debug,
execute:<BR># outlookAddin.py --debug<BR>#<BR># Then open
Pythonwin, and select "Tools->Trace Collector Debugging Tool"<BR>#
Restart Outlook, and you should see some output
generated.</SPAN></DIV></BLOCKQUOTE>
<DIV dir=ltr><SPAN class=275472221-03112005>With these results:</SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV dir=ltr><SPAN class=275472221-03112005><FONT
face="Courier New">C:\Python24\Lib\site-packages\win32com\demos>outlookAddin
--debug<BR>Registered: Python.Test.OutlookAddin (for
debugging)</FONT></SPAN></DIV></BLOCKQUOTE>
<DIV dir=ltr><SPAN class=275472221-03112005>When I opened Pythonwin, and
selected the Trace collector Debugging Tool and restarted Outlook I got
this in the Python Trace Collector Window:</SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV dir=ltr><SPAN class=275472221-03112005># This window will display
output from any programs that import win32traceutil<BR># win32com servers
registered with '--debug' are in this category.<BR>Object with win32trace
dispatcher created (object=None)<BR>pythoncom error: Failed to call the
universal dispatcher</SPAN></DIV>
<DIV> </DIV>
<DIV dir=ltr><SPAN class=275472221-03112005>Traceback (most recent call
last):<BR> File "C:\Python24\Lib\site-packages\win32com\universal.py",
line 177, in dispatch<BR> retVal =
ob._InvokeEx_(meth.dispid, 0, meth.invkind, args, None, None)<BR> File
"C:\Python24\Lib\site-packages\win32com\server\policy.py", line 332, in
_InvokeEx_<BR> return self._invokeex_(dispid, lcid,
wFlags, args, kwargs, serviceProvider)<BR> File
"C:\Python24\Lib\site-packages\win32com\server\policy.py", line 653, in
_invokeex_<BR> args, kwArgs = self._transform_args_(args,
kwArgs, dispid, lcid, wFlags, serviceProvider)<BR> File
"C:\Python24\Lib\site-packages\win32com\server\policy.py", line 640, in
_transform_args_<BR> arg =
win32com.client.Dispatch(arg)<BR> File
"C:\Python24\Lib\site-packages\win32com\client\__init__.py", line 96, in
Dispatch<BR> return __WrapDispatch(dispatch, userName,
resultCLSID, typeinfo, UnicodeToString, clsctx)<BR> File
"C:\Python24\Lib\site-packages\win32com\client\__init__.py", line 38, in
__WrapDispatch<BR> klass =
gencache.GetClassForCLSID(resultCLSID)<BR> File
"C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 179, in
GetClassForCLSID<BR> mod =
GetModuleForCLSID(clsid)<BR> File
"C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 232, in
GetModuleForCLSID<BR>
__import__(sub_mod_name)<BR>exceptions.SyntaxError: invalid syntax
(_Application.py, line 87)<BR>pythoncom error: Unexpected gateway
error</SPAN></DIV>
<DIV> </DIV>
<DIV dir=ltr><SPAN class=275472221-03112005>Traceback (most recent call
last):<BR> File "C:\Python24\Lib\site-packages\win32com\universal.py",
line 177, in dispatch<BR> retVal =
ob._InvokeEx_(meth.dispid, 0, meth.invkind, args, None, None)<BR> File
"C:\Python24\Lib\site-packages\win32com\server\policy.py", line 332, in
_InvokeEx_<BR> return self._invokeex_(dispid, lcid,
wFlags, args, kwargs, serviceProvider)<BR> File
"C:\Python24\Lib\site-packages\win32com\server\policy.py", line 653, in
_invokeex_<BR> args, kwArgs = self._transform_args_(args,
kwArgs, dispid, lcid, wFlags, serviceProvider)<BR> File
"C:\Python24\Lib\site-packages\win32com\server\policy.py", line 640, in
_transform_args_<BR> arg =
win32com.client.Dispatch(arg)<BR> File
"C:\Python24\Lib\site-packages\win32com\client\__init__.py", line 96, in
Dispatch<BR> return __WrapDispatch(dispatch, userName,
resultCLSID, typeinfo, UnicodeToString, clsctx)<BR> File
"C:\Python24\Lib\site-packages\win32com\client\__init__.py", line 38, in
__WrapDispatch<BR> klass =
gencache.GetClassForCLSID(resultCLSID)<BR> File
"C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 179, in
GetClassForCLSID<BR> mod =
GetModuleForCLSID(clsid)<BR> File
"C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 232, in
GetModuleForCLSID<BR>
__import__(sub_mod_name)<BR>exceptions.SyntaxError: invalid syntax
(_Application.py, line 87)</SPAN></DIV></BLOCKQUOTE>
<DIV dir=ltr><SPAN class=275472221-03112005>Can anyone shed any light on what
is going on?</SPAN></DIV>
<DIV dir=ltr><SPAN class=275472221-03112005></SPAN> </DIV>
<DIV dir=ltr><SPAN class=275472221-03112005>Thanks</SPAN></DIV>
<DIV dir=ltr><SPAN class=275472221-03112005>-Roe McBurnett</SPAN></DIV>
<DIV dir=ltr><SPAN
class=275472221-03112005>rdm2ATmcburnettDOTorg</SPAN></DIV></BLOCKQUOTE></FONT></SPAN></BODY></HTML>