[python-win32] win32com on activepython 2.3

Karl Fast karl.fast at pobox.com
Tue Nov 11 08:56:21 EST 2003


Upgrading to ActivePython 2.3 seems to have broken something with
win32com. I can't import win32com.client. There might be other
problems, but I can't get past this.

Importing win32com.client gives you this traceback:

>>>import win32com.client

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "D:\python\Lib\site-packages\win32com\client\__init__.py",
  line 12, in ?
    import dynamic, gencache, pythoncom
  File "D:\python\Lib\site-packages\win32com\client\gencache.py",
  line 623, in ? __init__()
  File "D:\python\Lib\site-packages\win32com\client\gencache.py",
  line 52, in __init__
    Rebuild()
  File "D:\python\Lib\site-packages\win32com\client\gencache.py",
  line 610, in Rebuild
    _SaveDicts()
  File "D:\python\Lib\site-packages\win32com\client\gencache.py",
  line 57, in _SaveDicts
    raise RuntimeError, "Trying to write to a readonly gencache
    ('%s')!" \ RuntimeError: Trying to write to a readonly gencache
    ('C:\DOCUME~1\fast\LOCALS~1\Temp\gen_py\2.3')!


It all worked until I upgraded from ActivePython 2.2

I can go back to 2.2, but I don't know if this is

  (a) a problem with the latest ActivePython
  (b) a problem with the latest win32 extensions
  (c) me doing something wrong and getting away with in 2.2 (I am
      new to python, but this is straight out of the examples)

Anyone able to help?

In my code I'm actually importing it like this, but I still get the
same "trying to write to a readonly gencache" error....

  from win32com.client import constants, Dispatch



--karl



More information about the Python-win32 mailing list