[pywin32-bugs] [ pywin32-Bugs-1295741 ] Lotus Notes
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2005-09-19 19:45:39
|
Bugs item #1295741, was opened at 2005-09-19 15:45 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1295741&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: com Group: None Status: Open Resolution: None Priority: 5 Submitted By: Philip Reed (philipreed) Assigned to: Nobody/Anonymous (nobody) Summary: Lotus Notes Initial Comment: Sorry in advance for a Notes-specific question, but I'm guessing Notes is just the stimulus that's provoking some kind of issue in win32com and python. I'm having trouble using win32com to access Lotus Notes email. Specifically, an attempt to get the Authors attribute of an IDocument crashes Python. In essence I'm attempting to port the VB example code from http://www.tek-tips.com/viewthread.cfm?qid=67791 to Python. Running the code sample below crashes with standard Windows error messages (The instruction at [memaddress] referenced memory at "0x00000005". The memory could not be "read") in three different environments: - From a Windows 2000 console interface. Dialog title is "python.exe - Application Error" - From IDLE. Dialog title is "pythonw.exe - Application Error" - From PythonWin. Title is "PythonWin: PythonWin.exe - Application Error". This is particularly egregious since it cascades into an MFC error that crashes the PythonWin editor! ** DEMO CODE ** import win32com.client sess = win32com.client.Dispatch ("Lotus.NotesSession") #instance of ISession sess.Initialize() #Will prompt for password first time through mailDb = sess.GetDatabase("", sess.UserName) mailDoc = mailDb.CreateDocument() b= mailDoc.IsValid #This works print "MailDoc.IsValid: ", b url = mailDoc.HttpURL #This works print "mailDoc.HttpURL ", url input = raw_input("Are you sure you want to crash PythonWin?") if input == "yes": print "Prepare for crash..." auths = mailDoc.Authors print "mailDoc.Authors", auths else: print "Chicken! Enjoy the safe landing" ** OUTPUT ** (Note: I made some minor hacks to win32com\client\__init__.py in _ApplyTypes_() and __getattr__() to enhance output.) (Also: Notes prompts for the password in a console, which shows up separately in Idle.) Class ID: {29131578-2EED-1069-BF5D-00DD011186B7} Class ID: {29131567-2EED-1069-BF5D-00DD011186B7} MailDoc.IsValid: True Class ID: {29131567-2EED-1069-BF5D-00DD011186B7} mailDoc.HttpURL: Are you sure you want to crash PythonWin?yes Prepare for crash... Class ID: {29131567-2EED-1069-BF5D-00DD011186B7} about to fail! wFlags: 2 ************* I also tried loading Python with -vd flags, which produces extra output I'll attach in a file. Any suggestions? Any way to further troubleshoot w/o hacking around in Python C++ source (e.g., turning on better debugging)? TIA, Philip ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=1295741&group_id=78018 |