Problem with py2exe and installer5b5_5

Eric Brunel eric.brunel at pragmadev.com
Fri Aug 22 04:15:46 EDT 2003


hellprout wrote:
> hi  , 
> i want to use py2exe or installer5b5_5 with my python source 
> 
> so no problem when i execute the source , but when i use installer or
> py2exe to create an exe file on windows , i have some problems
> when my program want to read a xml file i have an error 
> 
> 2.2.3 (#42, May 30 2003, 18:12:08) [MSC 32 bit (Intel)]
> Traceback (most recent call last):
>   File "wxFrame1.pyc", line 287, in OnButton1Button
>   File "EIM_xml.pyc", line 135, in main_xml
>   File "EIM_xml.pyc", line 44, in construction_liste_xml
>   File "xml\sax\__init__.pyc", line 33, in parse
>   File "xml\sax\expatreader.pyc", line 86, in parse
>   File "xml\sax\saxutils.pyc", line 250, in prepare_input_source
>   File "ntpath.pyc", line 274, in isfile
> LookupError: no codec search functions registered: can't find encoding

Apparently, there is some weird code importing the codecs that py2exe or 
McMillan installer cannot correctly figure out. I had the same problem some time 
ago, which I solved by simply importing explicitely the codecs module via an:

import codecs

somewhere in the code. This seems to fix up things for McM's installer (never 
used py2exe).

HTH
-- 
- Eric Brunel <eric.brunel at pragmadev.com> -
PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com





More information about the Python-list mailing list