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
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 104, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/views/generic/base.py", line 143, in dispatch
return handler(request, *args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/django/views/generic/edit.py", line 153, in post
return self.form_valid(form)
File "/usr/local/lib/python3.9/site-packages/markdownx/views.py", line 81, in form_valid
image_path = form.save(commit=True)
File "/usr/local/lib/python3.9/site-packages/markdownx/forms.py", line 61, in save
image = self._process_raster(image, image_extension)
File "/usr/local/lib/python3.9/site-packages/markdownx/forms.py", line 134, in _process_raster
preped_image = scale_and_crop(image, **MARKDOWNX_IMAGE_MAX_SIZE)
File "/usr/local/lib/python3.9/site-packages/markdownx/utils.py", line 124, in scale_and_crop
im = _scale(im=im, x=source_x * scale, y=source_y * scale)
File "/usr/local/lib/python3.9/site-packages/markdownx/utils.py", line 77, in _scale
resample=Image.ANTIALIAS
AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'
Until django-markdownx supports pillow 10.0.0, it would be better to limit pillow version to <10.0 using requirements.txt.
environment
django-markdownx 4.0.2
pillow 10.0.0
The text was updated successfully, but these errors were encountered:
If pillow 10.0.0 or greater version is installed, django-markdownx raises AttributeError when uploading a large size image by drag & drop to a form that is related to the markdownx widget. This occurs when the image is resized.
https://github.com/neutronX/django-markdownx/blob/v4.0.2/markdownx/utils.py#L123-L124
PIL.Image.ANTIALIAS has been removed at pillow 10.0.0.
https://pillow.readthedocs.io/en/stable/releasenotes/10.0.0.html#constants
Until django-markdownx supports pillow 10.0.0, it would be better to limit pillow version to <10.0 using requirements.txt.
environment
The text was updated successfully, but these errors were encountered: