Skip to content

Do not decode bytes in PPM error message #8958

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

radarhere
Copy link
Member

Resolves #8956

msg = f"Token too long in file header: {token.decode()}"
raise ValueError(msg)

The issue found a token value that could not be decoded, so this PR changes the error message to use bytes instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unanticipated UnicodeDecodeError raised during call to PIL.Image.open
1 participant