Skip to content

Pre-check images so failures in PIL can be tied to a specific item - #279

Closed
valipod wants to merge 1 commit into
collective:mainfrom
valipod:helper_for_broken_images
Closed

Pre-check images so failures in PIL can be tied to a specific item#279
valipod wants to merge 1 commit into
collective:mainfrom
valipod:helper_for_broken_images

Conversation

@valipod

@valipod valipod commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Give additional information about the images that fail in PIL, to assist in fixing their problem, otherwise the log info is unhelpful:
WARNING [plone.namedfile.utils:216][waitress-2] PIL can not recognize the image. Image is probably broken or of a non-supported format.

@valipod
valipod requested a review from pbauer April 28, 2026 13:52
@davisagli

Copy link
Copy Markdown
Member

It would be nice to improve the warning in plone.namedfile to include the exception from Pillow. Would you consider submitting a PR there? https://github.com/plone/plone.namedfile/blob/main/src/plone/namedfile/utils/__init__.py#L243

@davisagli

Copy link
Copy Markdown
Member

Oh, there's already a PR in progress which does that: plone/plone.namedfile#210

@valipod

valipod commented Apr 30, 2026

Copy link
Copy Markdown
Contributor Author

My bad, this gets scrapped then.

@valipod valipod closed this Apr 30, 2026
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.

2 participants