Since sometime yesterday, without me having touched my homeserver setup, I stopped receiving images from Telegram and seeing the following backtrace whenever someone tried to send to me one:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/mautrix_telegram/abstract_user.py", line 195, in _update_catch
await self._update(update)
File "/usr/local/lib/python3.8/dist-packages/mautrix_telegram/abstract_user.py", line 242, in _update
await self.update_message(update)
File "/usr/local/lib/python3.8/dist-packages/mautrix_telegram/abstract_user.py", line 476, in update_message
return await portal.handle_telegram_message(self, sender, update)
File "/usr/local/lib/python3.8/dist-packages/mautrix_telegram/portal/telegram.py", line 596, in handle_telegram_message
event_id = await {
File "/usr/local/lib/python3.8/dist-packages/mautrix_telegram/portal/telegram.py", line 92, in handle_telegram_photo
loc, largest_size = self._get_largest_photo_size(media.photo)
File "/usr/local/lib/python3.8/dist-packages/mautrix_telegram/portal/base.py", line 225, in _get_largest_photo_size
largest = max(photo.thumbs if isinstance(photo, Document) else photo.sizes,
File "/usr/local/lib/python3.8/dist-packages/mautrix_telegram/portal/base.py", line 226, in <lambda>
key=(lambda photo2: (len(photo2.bytes)
AttributeError: 'PhotoSizeProgressive' object has no attribute 'bytes'
I didn't dig into it much, but the following diff seems to fix the problem for me:
I have zero familiarity with these libraries, so I have no idea whether this is the right fix or a larger change is needed, but it seems to patch things up for now.
Since sometime yesterday, without me having touched my homeserver setup, I stopped receiving images from Telegram and seeing the following backtrace whenever someone tried to send to me one:
I didn't dig into it much, but the following diff seems to fix the problem for me:
I have zero familiarity with these libraries, so I have no idea whether this is the right fix or a larger change is needed, but it seems to patch things up for now.