[python-win32] Crash when calling Dispatch("Lotus.NotesSession")

Burkhard Kayser Burkhard.Kayser at t-online.de
Thu Apr 15 15:51:13 EDT 2004


Python crashes when I try to excecute Dispatch("Lotus.NotesSession").
Please find below the results of my debugging session.

Call Stack:
Dispatch("Lotus.NotesSession") in __init__.py
_GetGoodDispatchAndUserName() in dynamic.py
_GetGoodDispatch() in dynamic.py

In _GetGoodDispatch() an exception is raised when 
pythoncom.connect('Lotus.NotesSession') is called.

--- snip ---
>>> Unhandled exception while debugging...
Traceback (most recent call last):
  File "C:\Python23\Lib\site-packages\win32com\client\dynamic.py", line 70, in 
_GetGoodDispatch
    IDispatch = pythoncom.connect(IDispatch)
com_error: (-2147221021, 'Operation unavailable', None, None)
--- snip ---

This exception is then handled in the exeception clause by calling
pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
with IDispatch = "Lotus.NotesSession" and clsctx = 21.

Calling pythoncom.CoCreateInstance() calls __getattr__() of class Object in 
object.py. __getattr__ seems to end up in an endless loop which finally 
causes a stack overflow.

As soon as I've stepped into object.py all keys of the keyboard are blocked 
( only in the pythonwin ). Therefore I'm not able to do more investigations 
about the root cause.

I'm running "PythonWin 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit 
(Intel)] on win32." on Win2k.
Lotus is of version 5.0.8

Can somebody give me a hint how to explore the root cause of the problem or 
did somebody experience a similar problem with either Lotus Notes or an other 
COM Server.
Does this mean that Notes is not correct registered as a COM server ?

Burkhard




More information about the Python-win32 mailing list