[python-win32] n00b problems accessing Outlook
Mark Hammond
mhammond at skippinet.com.au
Thu Nov 10 06:57:27 CET 2005
MessageSorry 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.
Mark
-----Original Message-----
From: python-win32-bounces at python.org
[mailto:python-win32-bounces at python.org]On Behalf Of McBurnett, Roe D
Sent: Friday, 4 November 2005 8:40 AM
To: python-win32 at python.org
Subject: [python-win32] n00b problems accessing Outlook
Hi People,
I am new to Python, just installed the ActivePython 2.4.1 and downloaded
pywin32-205.win32-py2.4.exe.
I executed the provided demo application outlookAddin.py and got the
following error message:
C:\Python24\Lib\site-packages\win32com\demos>outlookAddin
Traceback (most recent call last):
File "C:\Python24\Lib\site-packages\win32com\demos\outlookAddin.py",
line 38,in ?
gencache.EnsureModule('{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}', 0,
2, 1, bForDemand=True) # Office 9
File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line
407, in EnsureModule
module = GetModuleForTypelib(typelibCLSID, tlbAttr[1], tlbAttr[3],
tlbAttr[4])
File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line
258, in GetModuleForTypelib
mod = _GetModule(modName)
File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line
629, in _GetModule
mod = __import__(mod_name)
File
"C:\Python24\lib\site-packages\win32com\gen_py\2DF8D04C-5BFA-101B-BDE5-00AA0
044DE52x0x2x2\__init__.py", line 1691
win32com.client.constants.__dicts__.append(constants.__dict__)
^
SyntaxError: invalid syntax
C:\Python24\Lib\site-packages\win32com\demos>outlookAddin
I edited the
"C:\Python24\lib\site-packages\win32com\gen_py\2DF8D04C-5BFA-101B-BDE5-00AA0
044DE52x0x2x2\__init__.py" file to remove a few comment lines and
re-executed with the following results:
C:\Python24\Lib\site-packages\win32com\demos>outlookAddin
Registered: Python.Test.OutlookAddin
So I followed the instructions in the module:
# To debug, execute:
# outlookAddin.py --debug
#
# Then open Pythonwin, and select "Tools->Trace Collector Debugging
Tool"
# Restart Outlook, and you should see some output generated.
With these results:
C:\Python24\Lib\site-packages\win32com\demos>outlookAddin --debug
Registered: Python.Test.OutlookAddin (for debugging)
When I opened Pythonwin, and selected the Trace collector Debugging Tool
and restarted Outlook I got this in the Python Trace Collector Window:
# This window will display output from any programs that import
win32traceutil
# win32com servers registered with '--debug' are in this category.
Object with win32trace dispatcher created (object=None)
pythoncom error: Failed to call the universal dispatcher
Traceback (most recent call last):
File "C:\Python24\Lib\site-packages\win32com\universal.py", line 177,
in dispatch
retVal = ob._InvokeEx_(meth.dispid, 0, meth.invkind, args, None,
None)
File "C:\Python24\Lib\site-packages\win32com\server\policy.py", line
332, in _InvokeEx_
return self._invokeex_(dispid, lcid, wFlags, args, kwargs,
serviceProvider)
File "C:\Python24\Lib\site-packages\win32com\server\policy.py", line
653, in _invokeex_
args, kwArgs = self._transform_args_(args, kwArgs, dispid, lcid,
wFlags, serviceProvider)
File "C:\Python24\Lib\site-packages\win32com\server\policy.py", line
640, in _transform_args_
arg = win32com.client.Dispatch(arg)
File "C:\Python24\Lib\site-packages\win32com\client\__init__.py", line
96, in Dispatch
return __WrapDispatch(dispatch, userName, resultCLSID, typeinfo,
UnicodeToString, clsctx)
File "C:\Python24\Lib\site-packages\win32com\client\__init__.py", line
38, in __WrapDispatch
klass = gencache.GetClassForCLSID(resultCLSID)
File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line
179, in GetClassForCLSID
mod = GetModuleForCLSID(clsid)
File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line
232, in GetModuleForCLSID
__import__(sub_mod_name)
exceptions.SyntaxError: invalid syntax (_Application.py, line 87)
pythoncom error: Unexpected gateway error
Traceback (most recent call last):
File "C:\Python24\Lib\site-packages\win32com\universal.py", line 177,
in dispatch
retVal = ob._InvokeEx_(meth.dispid, 0, meth.invkind, args, None,
None)
File "C:\Python24\Lib\site-packages\win32com\server\policy.py", line
332, in _InvokeEx_
return self._invokeex_(dispid, lcid, wFlags, args, kwargs,
serviceProvider)
File "C:\Python24\Lib\site-packages\win32com\server\policy.py", line
653, in _invokeex_
args, kwArgs = self._transform_args_(args, kwArgs, dispid, lcid,
wFlags, serviceProvider)
File "C:\Python24\Lib\site-packages\win32com\server\policy.py", line
640, in _transform_args_
arg = win32com.client.Dispatch(arg)
File "C:\Python24\Lib\site-packages\win32com\client\__init__.py", line
96, in Dispatch
return __WrapDispatch(dispatch, userName, resultCLSID, typeinfo,
UnicodeToString, clsctx)
File "C:\Python24\Lib\site-packages\win32com\client\__init__.py", line
38, in __WrapDispatch
klass = gencache.GetClassForCLSID(resultCLSID)
File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line
179, in GetClassForCLSID
mod = GetModuleForCLSID(clsid)
File "C:\Python24\Lib\site-packages\win32com\client\gencache.py", line
232, in GetModuleForCLSID
__import__(sub_mod_name)
exceptions.SyntaxError: invalid syntax (_Application.py, line 87)
Can anyone shed any light on what is going on?
Thanks
-Roe McBurnett
rdm2ATmcburnettDOTorg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20051110/c75d2860/attachment.htm
More information about the Python-win32
mailing list