3

I'm trying to use python to access Lotus Notes using the win32com module

import win32com
from win32com.client import Dispatch
notesSession = Dispatch('Lotus.NotesSession')

However, I get the following error message:

pywintypes.com_error: (-2147467259, 'Unspecified error', None, None)

If I try a different application, eg. 'Excel.Application', I don't get the error.

Is there anything additional I need to make Lotus Notes accessible to python?

Thanks Toby

Toby_w50
  • 51
  • 4
  • Did you see this question: http://stackoverflow.com/questions/34659861/python-how-can-i-access-lotus-notes-8-5-inbox-to-read-emails – D.Bugger Mar 23 '16 at 09:48
  • Yes, but my problem lies with accessing the 'Lotus.NotesSession' class at all. I'm suspecting the version of Notes used is here is non-standard in some way rendering the access via the standard COM classes unobtainable. – Toby_w50 Mar 24 '16 at 14:20
  • Notes has only standard versions, as far as I know. You could try to reinstall it, hoping that all libraries will be put in the correct place. – D.Bugger Mar 25 '16 at 09:55
  • 2
    Is your Python 32 bits? As far as I know you cannot access the Notes COM server from a 64-bit Python interpreter. – richieadler Aug 10 '19 at 16:24
  • 1
    @richieadler Thank you. After changing python to 32bit, the script works. – Jason.Jan May 20 '22 at 07:29

0 Answers0