Pillow/PIL exception: Tile cannot extend outside image
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
KARL3 |
Fix Released
|
Medium
|
Chris McDonough |
Bug Description
We had ten or so of these exceptions yesterday, all for trying to render the same image. I think the image is some KARL/PIL auto-generated thumbnail. Perhaps the original image is smaller than the coordinates we are trying to thumbnail down to
SystemError: tile cannot extend outside image
Exception when processing https:/
Referer: https:/
Traceback (most recent call last):
File "/srv/osfkarl/
response = handler(request)
File "/srv/osfkarl/
return response
File "/srv/osfkarl/
return self._retry_
File "/srv/osfkarl/
reraise(t, v, tb) # otherwise reraise the exception
File "/srv/osfkarl/
response = handler(request)
File "/srv/osfkarl/
response = view_callable(
File "/srv/osfkarl/
return view(context, request)
File "/srv/osfkarl/
result = view(context, request)
File "/srv/osfkarl/
thumb = context.
File "/srv/osfkarl/
self.
File "/srv/osfkarl/
thumb_
File "/srv/osfkarl/
save_
File "/srv/osfkarl/
ImageFile.
File "/srv/osfkarl/
e.setimage(
SystemError: tile cannot extend outside image
Changed in karl3: | |
status: | Fix Committed → Fix Released |
I did not validate that generating a thumbnail smaller than the original image was actually the problem in the above object, but I did add some guard code for this case:
https:/ /github. com/karlproject /karl/commit/ 30c5a70978aec82 2af8f7b1faa4541 c7432f86ef