By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,320 Members | 2,224 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,320 IT Pros & Developers. It's quick & easy.

Problem with McMillan Installer: no codec search function registered

P: n/a
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/pyt...ch/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



Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Pierre Rouleau wrote:
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/pyt...ch/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

Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.