Unable to access NSF file using Python code - 'Notes error: Could not open the ID file'

Viewed 328

I am new to Python programming. I am trying to access my IBM notes .NSF file using Python code.

Here is my code.

import win32com.client
import pywintypes
import getpass

def main():
    # Get credentials
    mailServer = '' 
    mailPath = "path to nsf file"



    mailPassword = 'IBM Notes Password'
    # Connect
    notesSession = win32com.client.Dispatch('Lotus.NotesSession')



    notesSession.Initialize(mailPassword)
    notesDatabase = notesSession.GetDatabase(mailServer, mailPath)

    # Get a list of folders
    folder = notesDatabase.GetView('$Inbox')
    document = folder.GetFirstDocument()


if __name__ == "__main__":
    main()

If I run the above code, I am getting the below error. com_error: (-2147352567, 'Exception occurred.', (0, 'NotesSession', 'Notes error: Could not open the ID file', None, 0, -2147217504), None)

0 Answers
Related