Hi Tim,

I have figured out the source of this error. We are running into issues with 
the comObjectModelGaurd. Our group policy recently changed to disallow 
programatic access to protected mailItem objects.

Modifying Outlook Users Trust settings or the registry will fix the problem.

R,
C. Blair

________________________________________
From: Blair, Colin S
Sent: Wednesday, March 9, 2016 7:33 AM
To: python-win32@python.org
Subject: pywintypes.com_error: (-2147467259, 'Unspecified error', None, None)

Thank for the response.

I have tried using the static proxy. The same error occurs.

I have also tried adding  DISP_E_EXCEPTION to the ERRORS_BAD_CONTEXT list in 
dynamic.py

Same result.

R,
Colin B.

Blair, Colin S wrote:
> Please assist me with this error:
>
> Traceback (most recent call last):
>
>     print msg.Body
>   File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 466, 
> in
>     __getattr__
>     return self._ApplyTypes_(*args)
>   File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 459, 
> in
>      _ApplyTypes_self._oleobj_.InvokeTypes(dispid, 0, wFlags, retType, 
> argTypes, *args),
>     pywintypes.com_error: (-2147467259, 'Unspecified error', None, None)

That's 0x80004005, which for MAPI is MAPI_E_CALL_FAILED.  Very generic.

Have you run gentypes.py on Outlook?  Perhaps you should try to generate
a static proxy:
    ol = win32com.client.gencache.EnsureDispatch("Outlook.Application")

--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to