Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal "can't locate locale" errors when zip file with directories is on the PYTHONPATH. #55274

Closed
nedbat opened this issue Jan 29, 2011 · 2 comments
Labels
type-bug An unexpected behavior, bug, or error

Comments

@nedbat
Copy link
Member

nedbat commented Jan 29, 2011

BPO 11065
Nosy @nedbat
Superseder
  • bpo-10955: Possible regression with stdlib in zipfile
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2011-01-29.19:38:23.891>
    created_at = <Date 2011-01-29.19:12:29.689>
    labels = ['type-bug']
    title = 'Fatal "can\'t locate locale" errors when zip file with directories is on the PYTHONPATH.'
    updated_at = <Date 2011-01-29.19:38:23.891>
    user = 'https://github.com/nedbat'

    bugs.python.org fields:

    activity = <Date 2011-01-29.19:38:23.891>
    actor = 'ned.deily'
    assignee = 'none'
    closed = True
    closed_date = <Date 2011-01-29.19:38:23.891>
    closer = 'ned.deily'
    components = ['None']
    creation = <Date 2011-01-29.19:12:29.689>
    creator = 'nedbat'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 11065
    keywords = []
    message_count = 2.0
    messages = ['127467', '127475']
    nosy_count = 1.0
    nosy_names = ['nedbat']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = '10955'
    type = 'behavior'
    url = 'https://bugs.python.org/issue11065'
    versions = ['Python 3.2']

    @nedbat
    Copy link
    Member Author

    nedbat commented Jan 29, 2011

    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

    @nedbat nedbat added the type-bug An unexpected behavior, bug, or error label Jan 29, 2011
    @nedbat
    Copy link
    Member Author

    nedbat commented Jan 29, 2011

    With help from ned_deily in #python-dev, we confirmed this is a dup of http://bugs.python.org/issue10955, and is already fixed.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants