py2exe and win32com

Thomas Heller theller at python.net
Thu Oct 16 03:25:23 EDT 2003


mnations at airmail.net (Marc) writes:

> Hi all,
>
> I tried for the first time compiling an app using py2exe and COM and
> had little success in getting it to run. I browsed for help, but
> couldn't find anything that was giving the error I'm getting. This is
> the problem:
>
> Traceback (most recent call last):
>   File "<string>", line 7, in ?
>   File "imputil.pyc", line 103, in _import_hook
>   File "<string>", line 52, in _import_top_module
>   File "imputil.pyc", line 216, in import_top
>   File "imputil.pyc", line 271, in _import_one
>   File "<string>", line 128, in _process_result
>   File "excel.pyc", line 1, in ?
>   File "imputil.pyc", line 132, in _import_hook
>   File "<string>", line 70, in _finish_import
>   File "imputil.pyc", line 316, in _load_tail
>   File "imputil.pyc", line 271, in _import_one
>   File "<string>", line 128, in _process_result
>   File "win32com\client\__init__.pyc", line 12, in ?
>   File "imputil.pyc", line 93, in _import_hook
>   File "imputil.pyc", line 347, in _do_import
>   File "imputil.pyc", line 271, in _import_one
>   File "<string>", line 128, in _process_result
>   File "win32com\client\gencache.pyc", line 519, in ?
>   File "win32com\client\gencache.pyc", line 44, in __init__
>   File "win32com\client\gencache.pyc", line 507, in Rebuild
>   File "win32com\client\gencache.pyc", line 49, in _SaveDicts
>   File "win32com\client\gencache.pyc", line 96, in GetGeneratePath
> IOError: [Errno 2] No such file or directory:
> 'L:\\gen_py\\__init__.py'
>
> There must be a special way to include the win32 modules, but I can't
> figure it out. Could someone point me in the right direction.

Marc,

I already replied to the private email you sent me without seeing this
one. Maybe this bug report is also related (if you're using the py2exe
0.5 version, with Python 2.3):
<http://sourceforge.net/tracker/index.php?func=detail&aid=819615&group_id=15583&atid=115583>

But I'm not really sure if it works or not.

Thomas




More information about the Python-list mailing list