Skip to content

Conversation

@radarhere
Copy link
Member

Pillow/src/decode.c

Lines 298 to 301 in 2563727

unpack = ImagingFindUnpacker(mode, rawmode, &bits);
if (!unpack) {
Py_DECREF(decoder);
PyErr_SetString(PyExc_ValueError, "unknown raw mode");

#4818 (comment) suggests that "unknown raw mode" is not completely descriptive here. This is a fair comment - it's not that the raw mode is unknown, it's that our list of unpackers doesn't have a mapping from the raw mode to the mode. The particular raw mode may be valid for other modes.

So this PR changes the text, mostly using the suggestion from the comment.

@hugovk hugovk added the automerge Automatically merge PRs that are ready label Apr 30, 2021
@mergify mergify bot merged commit 676f4db into python-pillow:master Apr 30, 2021
@radarhere radarhere deleted the error branch April 30, 2021 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Automatically merge PRs that are ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants