Python and Lotus Notes

Graham Fawcett graham.fawcett at gmail.com
Fri Nov 4 11:58:10 EST 2005


Marco Aschwanden wrote:
> The second line of your code is already a show stopper in my case:
>
>  from win32com.client import Dispatch
> session = Dispatch('Lotus.NotesSession')
> session.Initialize('my_secret_passwort')
>
> When started, ends:
> [snip]
> AttributeError: Lotus.NotesSession.Initialize
>
> It worked before though with Version 5.x of Notes. In Notes Version 6.X
> they introduced the session.Initialize() - that was the point, when I
> couldn't create an instance anymore. I found no hint on the net... Do you
> have any idea what is going wrong here?

I'm using 6.x here, so that's not the problem.

Is there any chance you have an old gen_py file in your path? E.g.,
does re-running the PythonWin "makepy" utility again make a difference?
Just a thought, but something might be "hard-coded" to your earlier 5.x
COM interface, and gen_py would be a likely suspect.

Also, If you have another language that you can use to do COM, e.g.
Visual Basic (in any of the MS Office apps, or in Visual Studio),
verify that you can create a Lotus.NotesSession using those
environments as well. It might be a lower-level (non-Python-related)
problem.

Graham




More information about the Python-list mailing list