Skip to content

Extension for MIME type is not recognized #111637

@frankenstein91

Description

@frankenstein91

Bug report

Bug description:

I currently have a problem with guessing file extensions from the MIME
type, unfortunately. I understood that only files with a registry at
IANA can be guessed and checked the linked page. As I understand, my
affected data is registered with IANA.

The IANA link:
https://www.iana.org/assignments/media-types/application/vnd.openxmlformats-officedocument.wordprocessingml.document

Python 3.11.5 (main, Sep  2 2023, 14:16:33) [GCC 13.2.1 20230801] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mimetypes
>>> print(mimetypes.guess_extension("vnd.openxmlformats-officedocument.wordprocessingml.document"))
None

I hoped to see .docx as a return value

CPython versions tested on:

3.11

Operating systems tested on:

Linux, Windows

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc direasystdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions