Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#79084 - [matrix-synapse] Failed to upload Images running pyllow 10.0

Attached to Project: Arch Linux
Opened by Alexandru Stan (amstan) - Thursday, 13 July 2023, 02:14 GMT
Last edited by Toolybird (Toolybird) - Thursday, 13 July 2023, 05:13 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Johannes Löthberg (demize)
Alexander Epaneshnikov (alex19EP)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: Seems that an API of pillow that matrix-synapse was depending on has been deprecated in arch's python-pillow 10.0.0. You get an error every time you try to upload an image (or do other things, i think including seeing a thumbnail).

Additional info:
* package version(s)
```
% pacman -Q python-pillow matrix-synapse
python-pillow 10.0.0-1
matrix-synapse 1.86.0-1 # this is the one from the testing repo too
```
* config and/or log files etc.
```
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/twisted/internet/defer.py", line 1693, in _inlineCallbacks
result = context.run(
^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/twisted/python/failure.py", line 518, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/synapse/media/url_previewer.py", line 330, in _do_preview
await self._precache_image_url(user, media_info, og)
File "/usr/lib/python3.11/site-packages/synapse/media/url_previewer.py", line 678, in _precache_image_url
dims = await self.media_repo._generate_thumbnails(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/synapse/media/media_repository.py", line 797, in _generate_thumbnails
t_byte_source = await defer_to_thread(
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/twisted/python/threadpool.py", line 244, in inContext
result = inContext.theWork() # type: ignore[attr-defined]
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/twisted/python/threadpool.py", line 260, in <lambda>
inContext.theWork = lambda: context.call( # type: ignore[attr-defined]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/twisted/python/context.py", line 117, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/twisted/python/context.py", line 82, in callWithContext
return func(*args, **kw)
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/synapse/logging/context.py", line 969, in g
return f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/synapse/media/thumbnailer.py", line 172, in crop
with self._resize(scaled_width, scaled_height) as scaled_image:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/synapse/media/thumbnailer.py", line 134, in _resize
return self.image.resize((width, height), Image.ANTIALIAS)
^^^^^^^^^^^^^^^
AttributeError: module 'PIL.Image' has no attribute 'ANTIALIAS'
```
* link to upstream bug report, if any
https://github.com/matrix-org/synapse/issues/15915

Steps to reproduce:
* Match my package version (or really any other older matrix-synapse version)
* Try uploading an image that's big

Workaround:
`sudo pacman -U python-pillow-9.5.0-2-x86_64.pkg.tar.zst`
This task depends upon

Closed by  Toolybird (Toolybird)
Thursday, 13 July 2023, 05:13 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#78978 
Comment by Alexandru Stan (amstan) - Thursday, 13 July 2023, 02:17 GMT
And... this was supposed to be attached to the [matrix-synapse] package, including in the title, but I clearly failed there. Not sure how to do that now.

Loading...