classification
Title: Fatal "can't locate locale" errors when zip file with directories is on the PYTHONPATH.
Type: behavior Stage:
Components: None Versions: Python 3.2
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Possible regression with stdlib in zipfile
View: 10955
Assigned To: Nosy List: nedbat
Priority: normal Keywords:

Created on 2011-01-29 19:12 by nedbat, last changed 2011-01-29 19:38 by ned.deily. This issue is now closed.

Messages (2)
msg127467 - (view) Author: Ned Batchelder (nedbat) * (Python triager) Date: 2011-01-29 19:12
Run this shell script against 3.2, and it will fail. Against 3.1, it succeeds. I've been running tests on Ubuntu 10.10.


mkdir -p sub
cat >sub/modzip.py <<END_PY
j = 1
END_PY
zip zipmod.zip sub/modzip.py
PYTHONPATH=zipmod.zip python3 -c "import sys; print(sys.version)"


The failure I get is:

Fatal Python error: Py_Initialize: Unable to get the locale encoding
LookupError: no codec search functions registered: can't find encoding
msg127475 - (view) Author: Ned Batchelder (nedbat) * (Python triager) Date: 2011-01-29 19:36
With help from ned_deily in #python-dev, we confirmed this is a dup of http://bugs.python.org/issue10955, and is already fixed.
History
Date User Action Args
2011-01-29 19:38:23ned.deilysetstatus: open -> closed
superseder: Possible regression with stdlib in zipfile
2011-01-29 19:36:21nedbatsetresolution: duplicate
messages: + msg127475
2011-01-29 19:12:29nedbatcreate