<!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!&nbsp; I think you may find this is a problem with pywin32 on 
Python 2.4.&nbsp; 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>&nbsp;</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>&nbsp;</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>&nbsp;</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&gt;outlookAddin<BR>Traceback 
    (most recent call last):<BR>&nbsp; File 
    "C:\Python24\Lib\site-packages\win32com\demos\outlookAddin.py", line 38,in 
    ?<BR>&nbsp;&nbsp;&nbsp; 
    gencache.EnsureModule('{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}', 0, 2, 1, 
    bForDemand=True) # Office 9<BR>&nbsp; File 
    "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 407, 
    in&nbsp;EnsureModule<BR>&nbsp;&nbsp;&nbsp; module = 
    GetModuleForTypelib(typelibCLSID, tlbAttr[1], tlbAttr[3], 
    tlbAttr[4])<BR>&nbsp; File 
    "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 258, 
    in&nbsp;GetModuleForTypelib<BR>&nbsp;&nbsp;&nbsp; mod = 
    _GetModule(modName)<BR>&nbsp; File 
    "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 629, 
    in&nbsp;_GetModule<BR>&nbsp;&nbsp;&nbsp; mod = 
    __import__(mod_name)<BR>&nbsp; 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>&nbsp;&nbsp;&nbsp; 
    ^<BR>SyntaxError: invalid syntax</FONT></DIV>
    <DIV><FONT face="Courier New"></FONT>&nbsp;</DIV>
    <DIV><FONT 
    face="Courier New">C:\Python24\Lib\site-packages\win32com\demos&gt;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&gt;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>#&nbsp;&nbsp; outlookAddin.py --debug<BR>#<BR># Then open 
    Pythonwin, and select "Tools-&gt;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&gt;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&nbsp;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>&nbsp;</DIV>
    <DIV dir=ltr><SPAN class=275472221-03112005>Traceback (most recent call 
    last):<BR>&nbsp; File "C:\Python24\Lib\site-packages\win32com\universal.py", 
    line 177, in dispatch<BR>&nbsp;&nbsp;&nbsp; retVal = 
    ob._InvokeEx_(meth.dispid, 0, meth.invkind, args, None, None)<BR>&nbsp; File 
    "C:\Python24\Lib\site-packages\win32com\server\policy.py", line 332, in 
    _InvokeEx_<BR>&nbsp;&nbsp;&nbsp; return self._invokeex_(dispid, lcid, 
    wFlags, args, kwargs, serviceProvider)<BR>&nbsp; File 
    "C:\Python24\Lib\site-packages\win32com\server\policy.py", line 653, in 
    _invokeex_<BR>&nbsp;&nbsp;&nbsp; args, kwArgs = self._transform_args_(args, 
    kwArgs, dispid, lcid, wFlags, serviceProvider)<BR>&nbsp; File 
    "C:\Python24\Lib\site-packages\win32com\server\policy.py", line 640, in 
    _transform_args_<BR>&nbsp;&nbsp;&nbsp; arg = 
    win32com.client.Dispatch(arg)<BR>&nbsp; File 
    "C:\Python24\Lib\site-packages\win32com\client\__init__.py", line 96, in 
    Dispatch<BR>&nbsp;&nbsp;&nbsp; return __WrapDispatch(dispatch, userName, 
    resultCLSID, typeinfo, UnicodeToString, clsctx)<BR>&nbsp; File 
    "C:\Python24\Lib\site-packages\win32com\client\__init__.py", line 38, in 
    __WrapDispatch<BR>&nbsp;&nbsp;&nbsp; klass = 
    gencache.GetClassForCLSID(resultCLSID)<BR>&nbsp; File 
    "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 179, in 
    GetClassForCLSID<BR>&nbsp;&nbsp;&nbsp; mod = 
    GetModuleForCLSID(clsid)<BR>&nbsp; File 
    "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 232, in 
    GetModuleForCLSID<BR>&nbsp;&nbsp;&nbsp; 
    __import__(sub_mod_name)<BR>exceptions.SyntaxError: invalid syntax 
    (_Application.py, line 87)<BR>pythoncom error: Unexpected gateway 
    error</SPAN></DIV>
    <DIV>&nbsp;</DIV>
    <DIV dir=ltr><SPAN class=275472221-03112005>Traceback (most recent call 
    last):<BR>&nbsp; File "C:\Python24\Lib\site-packages\win32com\universal.py", 
    line 177, in dispatch<BR>&nbsp;&nbsp;&nbsp; retVal = 
    ob._InvokeEx_(meth.dispid, 0, meth.invkind, args, None, None)<BR>&nbsp; File 
    "C:\Python24\Lib\site-packages\win32com\server\policy.py", line 332, in 
    _InvokeEx_<BR>&nbsp;&nbsp;&nbsp; return self._invokeex_(dispid, lcid, 
    wFlags, args, kwargs, serviceProvider)<BR>&nbsp; File 
    "C:\Python24\Lib\site-packages\win32com\server\policy.py", line 653, in 
    _invokeex_<BR>&nbsp;&nbsp;&nbsp; args, kwArgs = self._transform_args_(args, 
    kwArgs, dispid, lcid, wFlags, serviceProvider)<BR>&nbsp; File 
    "C:\Python24\Lib\site-packages\win32com\server\policy.py", line 640, in 
    _transform_args_<BR>&nbsp;&nbsp;&nbsp; arg = 
    win32com.client.Dispatch(arg)<BR>&nbsp; File 
    "C:\Python24\Lib\site-packages\win32com\client\__init__.py", line 96, in 
    Dispatch<BR>&nbsp;&nbsp;&nbsp; return __WrapDispatch(dispatch, userName, 
    resultCLSID, typeinfo, UnicodeToString, clsctx)<BR>&nbsp; File 
    "C:\Python24\Lib\site-packages\win32com\client\__init__.py", line 38, in 
    __WrapDispatch<BR>&nbsp;&nbsp;&nbsp; klass = 
    gencache.GetClassForCLSID(resultCLSID)<BR>&nbsp; File 
    "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 179, in 
    GetClassForCLSID<BR>&nbsp;&nbsp;&nbsp; mod = 
    GetModuleForCLSID(clsid)<BR>&nbsp; File 
    "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line 232, in 
    GetModuleForCLSID<BR>&nbsp;&nbsp;&nbsp; 
    __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>&nbsp;</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>