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

Clarified error message #5457

Merged
merged 1 commit into from
Apr 30, 2021
Merged

Clarified error message #5457

merged 1 commit into from
Apr 30, 2021

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.

None yet

2 participants