Problem with McMillan Installer: no codec search function registered
Pierre Rouleau
prouleau at impathnetworks.com
Thu Feb 26 15:59:52 EST 2004
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/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
More information about the Python-list
mailing list