mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-09 14:54:46 +03:00
include exception in warning message
This commit is contained in:
parent
05c3646058
commit
0568292553
|
@ -519,7 +519,7 @@ def _encode_ipython_image(image, image_format):
|
|||
try:
|
||||
image.save(b, image_format)
|
||||
except Exception as e:
|
||||
warnings.warn(f"failed to encode image as {image_format}")
|
||||
warnings.warn(f"failed to encode image as {image_format}: {e}")
|
||||
return None
|
||||
return b.getvalue()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user