[python-win32] win32com on activepython 2.3
Jens B. Jorgensen
jens.jorgensen at tallan.com
Tue Nov 11 10:42:43 EST 2003
I've heard another report as well. Someone used makepy.py to generate a
wrapper for the visual sourcesafe typelib. This failed initially because
the relocated genpy cache didn't have directories created (I believe I
saw in the changelog this is now fixed) but even after that he got an
error from the module when it was imported. It truly seems like
something's broken in there.
Anyhow the error you're reporting is just the problem with the gencache.
You need to create the missing directories in that path it lists for the
gencache and that will solve that problem.
Karl Fast wrote:
>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
>
>_______________________________________________
>Python-win32 mailing list
>Python-win32 at python.org
>http://mail.python.org/mailman/listinfo/python-win32
>
>
--
Jens B. Jorgensen
jens.jorgensen at tallan.com
"With a focused commitment to our clients and our people, we deliver value through customized technology solutions."
More information about the Python-win32
mailing list