Problem with McMillan Installer: no codec search function registered

P

Pierre Rouleau

Hi all,

When building a exe for a Python application under Windows XP with The
McMillan installer, the insttaltion succeeds but when I run the
resulting executable the application tracebacks complaining about a
codec not being registered:

Traceback (most recent call last):
File "<string>", line 222, in ?
File "ivcm\buildivcm\out1.pyz/gettext", line 428, in install
File "ivcm\buildivcm\out1.pyz/gettext", line 416, in translation
File "ivcm\buildivcm\out1.pyz/gettext", line 176, in __init__
File "ivcm\buildivcm\out1.pyz/gettext", line 304, in _parse
LookupError: no codec search functions registered: can't find encoding

This application runs fine when executing from python.exe. It generates
the following error when I run the executable built with the McMillan
Installer.

I have found a solution for the problem if I was using py2exe (which
I'll probably try soon) in
http://mail.python.org/pipermail/python-list/2003-March/155106.html.


My app uses in some of the .py files

# -*- coding: iso-8859-1 -*-

What is strange is that I can build the application inside another
computer running XP and the same version of the McMillan installer) and
the problem does not show up.

I would try to get help from Gordon McMillan's site but it has been down
for several weeks, so if someone encountered the same problem, and
solved it, I'd really like to hear if you ran into the same problem.

My setup:
Python 2.3.3
McMillan Installer 5b5

My App:
Uses wxPython 2.4.2.4

Thansk for any help,

Pierre
 
P

Pierre Rouleau

Pierre said:
Hi all,

When building a exe for a Python application under Windows XP with The
McMillan installer, the insttaltion succeeds but when I run the
resulting executable the application tracebacks complaining about a
codec not being registered:

Traceback (most recent call last):
File "<string>", line 222, in ?
File "ivcm\buildivcm\out1.pyz/gettext", line 428, in install
File "ivcm\buildivcm\out1.pyz/gettext", line 416, in translation
File "ivcm\buildivcm\out1.pyz/gettext", line 176, in __init__
File "ivcm\buildivcm\out1.pyz/gettext", line 304, in _parse
LookupError: no codec search functions registered: can't find encoding

This application runs fine when executing from python.exe. It generates
the following error when I run the executable built with the McMillan
Installer.

I have found a solution for the problem if I was using py2exe (which
I'll probably try soon) in
http://mail.python.org/pipermail/python-list/2003-March/155106.html.


My app uses in some of the .py files

# -*- coding: iso-8859-1 -*-

What is strange is that I can build the application inside another
computer running XP and the same version of the McMillan installer) and
the problem does not show up.

I would try to get help from Gordon McMillan's site but it has been down
for several weeks, so if someone encountered the same problem, and
solved it, I'd really like to hear if you ran into the same problem.

My setup:
Python 2.3.3
McMillan Installer 5b5

My App:
Uses wxPython 2.4.2.4

I found the solution to the problem. There is a bug in McMillan
Installer 5b5: it does not handle the codec properly for Unicode. To
solve the problem, the Installer/support/useUnicode.py file must be updated:

Replace:

import codecs
with:
import encodings


Hope this can help anyone that runs into the same problem.

Pierre
 

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,969
Messages
2,570,161
Members
46,705
Latest member
Stefkari24

Latest Threads

Top