Problem with py2exe and installer5b5_5

H

hellprout

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

i don't know what is it , but i surch something and i did't find the
solution
if something have an idea , thanks a lot

charles
 
E

Eric Brunel

hellprout said:
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
 
A

Andrew McLean

Eric Brunel said:
hellprout said:
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).

I had a similar problem with the McMillan installer. This wasn't solved
by adding:

import codecs

but it was solved by adding

import encodings
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top