[Python-Dev] What's required to keep OS/2 support in Python 3.3 (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Fri Jan 6 21:28:29 CET 2012


On Sat, 07 Jan 2012 06:28:00 +1030 Paul Smedley <paul at smedley.id.au> wrote:

I now have a dll and exe - however when it tried to build the modules, it dies with: Could not find platform independent libraries Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] Fatal Python error: PyInitialize: Unable to get the locale encoding

I would look at this line:

LookupError: no codec search functions registered: can't find encoding

Normally the standard codec search function is registered when importing the "encodings" module (see Lib/encodings/init.py), which is done at the end of _PyCodecRegistry_Init() in Python/codecs.c. There's this comment there:

        /* Ignore ImportErrors... this is done so that
           distributions can disable the encodings package. Note
           that other errors are not masked, e.g. SystemErrors
           raised to inform the user of an error in the Python
           configuration are still reported back to the user. */

For the purpose of debugging you could not ignore the error and instead print it out or bail out.

Regards

Antoine.



More information about the Python-Dev mailing list