You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the below code is run, a UnicodeDecodeError is raised when attempting to raise a ValueError with a descriptive message to the user. This occurs in _read_token at line 97 in PpmImagePlugin.py.
File "rep.py", line 6, in <module>
PIL.Image.open(d)
File "lib/python3.10/site-packages/PIL/Image.py", line 3551, in open
im = _open_core(fp, filename, prefix, formats)
File "lib/python3.10/site-packages/PIL/Image.py", line 3539, in _open_core
im = factory(fp, filename)
File "lib/python3.10/site-packages/PIL/ImageFile.py", line 147, in __init__
self._open()
File "/lib/python3.10/site-packages/PIL/PpmImagePlugin.py", line 119, in _open
self._size = int(self._read_token()), int(self._read_token())
File "lib/python3.10/site-packages/PIL/PpmImagePlugin.py", line 97, in _read_token
msg = f"Token too long in file header: {token.decode()}"
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xee in position 10: unexpected end of data
The text was updated successfully, but these errors were encountered:
When the below code is run, a
UnicodeDecodeError
is raised when attempting to raise aValueError
with a descriptive message to the user. This occurs in_read_token
at line 97 in PpmImagePlugin.py.Minimal Reproducer
Version Info
11.2.1
Traceback Report
The text was updated successfully, but these errors were encountered: