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
I accidentally ingested some bad images which are invalid data. Instead of failing silently as per normal, I end up with an uncaught exception when I try to render my page due to a ZeroDivisionError. This is very disruptive, and seems to go against the stated goal of the package to fail silently. Could I request error handling when source_x or source_y is zero?
File "/Users/bixbyr/anaconda3/envs/Shelterware_v2/lib/python3.8/site-packages/django/template/base.py", line 1038, in render
output = self.filter_expression.resolve(context)
File "/Users/bixbyr/anaconda3/envs/Shelterware_v2/lib/python3.8/site-packages/django/template/base.py", line 728, in resolve
new_obj = func(obj, *arg_vals)
File "/Users/bixbyr/anaconda3/envs/Shelterware_v2/lib/python3.8/site-packages/easy_thumbnails/templatetags/thumbnail.py", line 301, in thumbnail_url
raise e
File "/Users/bixbyr/anaconda3/envs/Shelterware_v2/lib/python3.8/site-packages/easy_thumbnails/templatetags/thumbnail.py", line 298, in thumbnail_url
thumb = get_thumbnailer(source)[alias]
File "/Users/bixbyr/anaconda3/envs/Shelterware_v2/lib/python3.8/site-packages/easy_thumbnails/files.py", line 344, in __getitem__
return self.get_thumbnail(options, silent_template_exception=True)
File "/Users/bixbyr/anaconda3/envs/Shelterware_v2/lib/python3.8/site-packages/easy_thumbnails/files.py", line 508, in get_thumbnail
thumbnail = self.generate_thumbnail(
File "/Users/bixbyr/anaconda3/envs/Shelterware_v2/lib/python3.8/site-packages/easy_thumbnails/files.py", line 389, in generate_thumbnail
thumbnail_image = engine.process_image(image, thumbnail_options,
File "/Users/bixbyr/anaconda3/envs/Shelterware_v2/lib/python3.8/site-packages/easy_thumbnails/engine.py", line 35, in process_image
image = processor(image, **processor_options)
File "/Users/bixbyr/anaconda3/envs/Shelterware_v2/lib/python3.8/site-packages/easy_thumbnails/processors.py", line 179, in scale_and_crop
scale = min(target_x / source_x, target_y / source_y)
ZeroDivisionError: float division by zero
The text was updated successfully, but these errors were encountered:
I accidentally ingested some bad images which are invalid data. Instead of failing silently as per normal, I end up with an uncaught exception when I try to render my page due to a ZeroDivisionError. This is very disruptive, and seems to go against the stated goal of the package to fail silently. Could I request error handling when source_x or source_y is zero?
The text was updated successfully, but these errors were encountered: