Python : How can I access Lotus Notes 8.5 Inbox to read emails -


i want make script in python reads mails lotus notes 8.5 , create each email issue in jira returns me error when try read mails lotus:

traceback (most recent call last): file "from_lotus_to_jira.py", line 46, in <module> main() file "from_lotus_to_jira.py", line 39, in main folder = notesdatabase.getview('$inbox') file "c:\python27\lib\site-packages\win32com\gen_py\29131520-2eed-1069-bf5d-00 dd011186b7x0x1x2.py", line 1849, in getview ret = self._oleobj_.invoketypes(1610743866, lcid, 1, (9, 0), ((8, 1),),pname  pywintypes.com_error: (-2147352567, 'exception occurred.', (0, u'notesdatabase', u'database  server_name!!c:\\users\\myname\\appdata\\local\\lotus\\notes\\data\\ma il202\\myname.nsf has not been opened yet', none, 0, -2147217441), none) 

here .py file

import win32com.client import pywintypes import getpass  def main():     # credentials     mailserver = 'server_name'      mailpath = 'c:\users\myname\appdata\local\lotus\notes\data\mail202\myname.nsf'       mailpassword = ''     # connect     notessession = win32com.client.dispatch('lotus.notessession')        notessession.initialize(mailpassword)     notesdatabase = notessession.getdatabase(mailserver, mailpath)      # list of folders     folder = notesdatabase.getview('$inbox')     document = folder.getfirstdocument()    if __name__ == "__main__":     main() 

looking @ http://www-01.ibm.com/support/docview.wss?uid=swg21308538

the full filepath (e.g. "c:\notes\data\r_apps\haha.nsf") may optionally used when accessing local databases on workstation. if specify server name, however, or if code running on server, must use path relative notes data directory ("r_apps\haha.nsf").

i suggest either (a) not specifying server or (b) giving relative path, ie mailpath = r'mail202\myname.nsf'.


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -