Skip to content

ZipFile - That compression method is not supported #132223

Closed as not planned
Closed as not planned
@alex-bork

Description

@alex-bork

Bug report

Bug description:

Hi, when I try to read a zipfile that has compression = 0, I get everytime the error "That compression method is not supported". In the debugger, the compression is set to 99 instead of take the one from the file itself.

I have found the code block where it is set to 99. But first my coding:

            with zip.ZipFile(io.BytesIO(zip2load.read()), mode="r") as zipfile:
                files = zip.ZipFile.namelist(zipfile)
                append_files = []
                for file in files:
                    name, ext = os.path.splitext(file)
                    try:
                        file_bytes = zipfile.read(file, pwd=password if password else None)
                    except Exception as ex:

CPython versions tested on:

3.13

Operating systems tested on:

macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or error

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions