makepy must be run after restart of pythonwin

Discussion in 'Python' started by bk, Aug 7, 2003.

  1. bk

    bk Guest

    hi,

    thank you for the hint, but i solved the problem myself.
    i didnt knew that that the following two lines in py-script must be added:

    from win32com.client import gencache
    gencache.EnsureModule('{00062FFF-0000-0000-C000-000000000046}',0,8,0)

    now it works fine. my skills in python in python are not really advanced, so
    the python-mailinglists are good help for me.

    so long
    ben


    >hi,
    >
    >i'm using pythonwin 2.2.3
    >my programm reads and write the outlook-adress book using COM. for this i
    >have to use the makepy utility. after i have run the utiltity everything is
    >fine and i can run my py-file without any errors.
    >but if i close the pythonwin and restart and then try to run my py-script i
    >get the following error:
    >
    >File "C:\Program Files\Python22\contacts_ausgabe.py", line 45, in
    >DumpDefaultAddressBook
    > folder =
    >mapi.GetDefaultFolder(win32com.client.constants.olFolderContacts)
    > File

    "C:\PROGRA~1\Python22\lib\site-packages\win32com\client\__init__.py",
    >line 168, in __getattr__
    > raise AttributeError, a
    >AttributeError: olFolderContacts


    I suggest you examine the attributes of win32com.client.constants. Perhaps
    there is a case sensitivity issue. makepy can cause attributes that were
    previously case insensitive to become case sensitive.

    I also recall somewhere a discussion about win32com.client.constants not
    being populated immediately. Consider waiting a moment after dispaching.

    Bob Gailer

    303 442 2625
     
    bk, Aug 7, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. stephan
    Replies:
    0
    Views:
    446
    stephan
    Jul 30, 2003
  2. bk
    Replies:
    0
    Views:
    362
  3. Paul Keating
    Replies:
    0
    Views:
    488
    Paul Keating
    Apr 18, 2005
  4. Mark
    Replies:
    3
    Views:
    443
  5. Josef Moellers

    Restart Perl Application upon KDE Restart

    Josef Moellers, Jul 18, 2013, in forum: Perl Misc
    Replies:
    18
    Views:
    287
    Adam H. Kerman
    Jul 26, 2013
Loading...

Share This Page