[pywin32-bugs] [ pywin32-Bugs-946672 ] Error appending to __path__ in win32com/__init__.py
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2004-05-03 14:00:12
|
Bugs item #946672, was opened at 2004-05-02 18:46 Message generated for change (Comment added) made by atuining You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=946672&group_id=78018 Category: com Group: None Status: Deleted Resolution: Invalid Priority: 5 Submitted By: Viktor Ferenczi (complex) Assigned to: Nobody/Anonymous (nobody) Summary: Error appending to __path__ in win32com/__init__.py Initial Comment: WinXP Prof ENG SP1 python 2.3.3 pywin32-201.win32-py2.3 cx_Freeze 2.2 I compiled one of my python applications with cx_Freeze. It successfully run with win32all-163-py23, but does not work with pywin32-201.win32-py2.3. After some debugging I figured out, that the __path__ variable in th 47th line of win32com/__init__.py contains a string for cx_Freeze compiled applications, not a list. File "D:\Python23\lib\site- packages\win32com\__init__.py", line 47, in SetupEn vironment __path__.append( win32api.GetFullPathName (__path__[0] + "\..\win32comext") ) AttributeError: 'str' object has no attribute 'append' Running the app without compiling works fine. Can win32all avoid the usage of the __path__ module variable? It is problematic for standalone EXE compilers. (Maybe this is a bug of cx_Freeze.) ---------------------------------------------------------------------- Comment By: Anthony Tuininga (atuining) Date: 2004-05-03 08:00 Message: Logged In: YES user_id=619560 This is due to the fact that win32com now expects that sys.frozen is set if you are running a "frozen" application. You can set sys.frozen to True somewhere prior to your import of win32com and everything should work. A new version of cx_Freeze (still unrelased) automatically sets sys.frozen to True automatically on starrtup. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=946672&group_id=78018 |